-
ASP inside local script
I want to write ASP indise local script tags so that I can make dynamic functions, obviously this is not possible because I tried doing it and i had errors, is there anyway around this. e.g.
<script language=jscript>
JScript here
<%
ASP code here
%>
JScript here
</script>
-
That should work. Just make sure your ASP is generating valid client side code that you're not trying to have your ASP script use or read any of the client side variables or script.
-
Or instead of using a script tag literal, use Response.Write to create the script tag as well.
-
It's not such a good method to use a scritpt inside another, that's why you have this problems. Respect this rule and problems we'll disapeared.
-
Rules like that are meant to be bent. Especially for creating dynamic dropdown lists. Or writing server side data into client side arrays so they can be accessed after the page is rendered.
Follow what JoshT and myself have said and you can do what your trying to do.
-
cheers....
cheers guys, i think i'll take the easy way out and write the remote script inside local script.
Thanks again.