[Mapserver-users] ASP Programming
Ed McNierney
ed at topozone.com
Thu May 15 11:44:36 PDT 2003
Yvette -
It works just fine, but you need to understand what's happening where and when. The VBScript code on your ASP page will be executed on the SERVER, as the output page is being generated. The JavaScript will be written to the output page, where it's going to be executed inside the BROWSER at the client, after the server's all done and gone on to other things.
For example, the following code:
function go () {
<% for i = 1 to 5 %>
alert ('The number is <% =i %>');
<% next %>
}
will execute the ASP code on the server, causing the following JavaScript to be written to the client:
function go () {
alert ('The number is 1');
alert ('The number is 2');
alert ('The number is 3');
alert ('The number is 4');
alert ('The number is 5');
}
which, if and when that function is executed on the client, will cause five alerts to pop up.
Please do not think that the JavaScript, when executed, can then cause VBScript on the same page to be executed by the SERVER - that's not possible. The server generates the page FIRST, then the client gets it and can interpret it anyway it likes. The client cannot "interact" with the server on the same page - although the JavaScript code could open a new ASP page in the same or different window.
- Ed
Ed McNierney
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
ed at topozone.com
(978) 251-4242
-----Original Message-----
From: Hurtubise, Yvette [mailto:Hurtubise at chilliwack.com]
Sent: Thursday, May 15, 2003 2:22 PM
To: mapserver-users at lists.gis.umn.edu
Subject: [Mapserver-users] ASP Programming
Has anyone had success using ASP script inside of JavaScript?
ex.
function go(){
<% FOR i = 1 to 2 %>
...
<%NEXT%>
}
I have read that this is possible, but I have not been able to implement it successfully
Can anyone help with this?
Yvette
_______________________________________________
Mapserver-users mailing list
Mapserver-users at lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
More information about the MapServer-users
mailing list