[mapserver-users] javascript in html templates

Lime, Steve D (DNR) Steve.Lime at state.mn.us
Tue Jan 24 17:03:52 EST 2012


The answer here depends on your development framework. It's not a MapServer issue. By default the browser won't execute javascript in the response and you have to work around that. Frameworks like ExtJS provide options to do this via their AJAX classes. Check your framework's (e.g. jQuery, Dojo or whatever) docs for more information. There are also solutions on the web, search for something like "executing javascript in ajax response".

Steve

-----Original Message-----
From: mapserver-users-bounces at lists.osgeo.org [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of KenHeer1
Sent: Tuesday, January 24, 2012 3:53 PM
To: mapserver-users at lists.osgeo.org
Subject: [mapserver-users] javascript in html templates

I'm trying to figure out why the inline javascript I have stopped working
sometime back.

Basically, I'm getting the CGI variables back in a getfeatureinfo request
and doing simple "if, then statements" in some inline javascript to check
for a condition. I can see in Firebug that the html template file is put
together properly but anything inside my script tags is ignored. If I take
the resulting html page that is returned and save it as a normal html page
and check it, it displays fine. We are using Mapserver 5.6.6 in MS4W 3.0.1
(I think that's it).

Any input would be appreciated.

--
View this message in context: http://osgeo-org.1560.n6.nabble.com/javascript-in-html-templates-tp4336706p4336706.html
Sent from the Mapserver - User mailing list archive at Nabble.com.
_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users




More information about the mapserver-users mailing list