Revision history [back]

click to hide/show revision 1
initial version

answered 2020-06-23 12:21:48 +0800

cor3000 gravatar image cor3000

you do the same as I showed in the example:

    <gmarker id="marker01" lat="0" lng="0" open="true">
        <attribute name="content"><![CDATA[
            some text
            <a role="button" href="#" onclick="zk.$('$marker01').doClickContentLink({ info: 'more_info', foo: 'this is a Map at server side', bar: 1234 });">more info</a>
            more text
            <a role="button" href="#" onclick="zk.$('$marker01').doClickContentLink('just a string');">even more info</a>
        ]]></attribute>
    </gmarker>

the <attribute name="content"> is equivalent to calling gmarker.setContent("the same long string there including the JS");

you do the same as I showed in the example:

    <gmarker id="marker01" lat="0" lng="0" open="true">
        <attribute name="content"><![CDATA[
            some text
            <a role="button" href="#" onclick="zk.$('$marker01').doClickContentLink({ info: 'more_info', foo: 'this is a Map at server side', bar: 1234 });">more info</a>
            more text
            <a role="button" href="#" onclick="zk.$('$marker01').doClickContentLink('just a string');">even more info</a>
        ]]></attribute>
    </gmarker>

the <attribute name="content"> is equivalent to calling gmarker.setContent("the same long string there including the JS");

gmarker.setContent("some text<a role=\"button\" href=\"#\" " + 
    "onclick=\"zk.$('$marker01').doClickContentLink( ... [the same content here]");
Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More