[Chameleon-dev] [Bug 1817] [Chameleon-Widgets]Javascript in legend
template (LegendTemplate widget) is not executed in JSAPI mode
bugzilla-daemon at bugzilla.maptools.org
bugzilla-daemon at bugzilla.maptools.org
Mon Nov 5 12:04:43 EST 2007
http://bugzilla.maptools.org/show_bug.cgi?id=1817
------- Additional Comments From nsavard at mapgears.com 2007-11-05 12:04 -------
I suggest to modify CWCLegendTemplateProcessed() method to evaluate the
JavaScript code found in the HTML.
oLegendTemplateDiv = this.GetDocumentDivObject("legendTemplateDiv");
oLegendTemplateDiv.innerHTML = "<table>" + newString + "</table>";
//getElementsbyTagName not supported for NN4
if ( this.bNetscape4 == 1 )
return true;
var aoScriptTags = oLegendTemplateDiv.getElementsByTagName('script');
var szScriptToExecute;
for(var j=0;j<aoScriptTags.length; j++)
{
if (this.bNetscape6 == 1)
{
szScriptToExecute = aoScriptTags[j].textContent;
}
else
{
szScriptToExecute = aoScriptTags[j].text;
}
eval(szScriptToExecute);
}
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Please do NOT reply to this email, use the link above instead to
login to bugzilla and submit your comment. Any email reply to this
address will be lost.
More information about the Chameleon-dev
mailing list