D
Dan
Excuse me if i'm being a bit thick here, but is it possible to
reference a server side variable within an embedded js source file.
For example, my test.js file contains
alert('<%=tmpVar%>');
and my aspx page contains:-
<script type="text/javascript" src="test.js">
This simple pops up an alert box containing <%=tmpVar%>, rather than
the actual value of my server side variable.
I can understand why it doesn't parse it to my test.js file.
Anyone got any suggestions on how i can do this? I don't really want to
have to include my javascript in my aspx header, due to maintenance
issues.
Thanks in advance for any suggestions.
Dan
reference a server side variable within an embedded js source file.
For example, my test.js file contains
alert('<%=tmpVar%>');
and my aspx page contains:-
<script type="text/javascript" src="test.js">
This simple pops up an alert box containing <%=tmpVar%>, rather than
the actual value of my server side variable.
I can understand why it doesn't parse it to my test.js file.
Anyone got any suggestions on how i can do this? I don't really want to
have to include my javascript in my aspx header, due to maintenance
issues.
Thanks in advance for any suggestions.
Dan