If anyone is interested: I have been looking to see how to do this.
It looks like when using JavaScript in an ASP page treat it as if you where writing it in any other run of the mill page. Which his nice.
But the second you want to know anything about the page your working in (as in the place the ASP sits) i.e. document.ANYTHINGELSE it all goes horribly wrong.
You can’t get access to these variables, which is not good
I had a look on some other sites and some people are recommending getting involved with setting up some AJAX on the desired page or you could send over what value you need in a hidden field.
This last suggestion sort of makes sense and I’m going to try this out
Remember that server-side code executes before the HTML is rendered so page elements will not be available to the script.
As far as I know the ASP server has to be setup to provide server-side JScript and I do not think it is set to do so by default. You may have to alter the server to provide for server-side scripting other than VBScript.
What is it you need to do server-side?
You can always create your HTML via the server-side code and thereby ensure it is available but you are not going to be able to do a lot of processing of the page after the HTML is rendered.
At my age I still learn something new every day, but I forget two others.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.