Hey guys, I'm trying to learn AJAX, and I'm having a problem running any ASP scripts. I'm pretty sure the code is all accurate, as I finally resorted to just pulling the scripts off the tutorial's server. (Which work great when I'm browsing their site.)
The problem is, my ASP script is very simple, and looks like:
Then I have an HTML page that just sets the value of a text input box to the xmlRequest's responseText. Instead of actually displaying the time though, it just displays "<%" (the first line of the file.)
If I change the ASP script to read:
Then the input box is set to "Hi there." Can anyone explain this mystery for me? If necessary, I can post the HTML file too, but it's pretty basic and I don't believe that's the problem. TIA!
Edit: I've tried both previewing the files locally in Safari, as well as transferring them to my server and running them over the web.
The problem is, my ASP script is very simple, and looks like:
Code:
<%
response.expires=-1
response.write(time)
%>
Then I have an HTML page that just sets the value of a text input box to the xmlRequest's responseText. Instead of actually displaying the time though, it just displays "<%" (the first line of the file.)
If I change the ASP script to read:
Code:
Hi there
<%
response.expires=-1
response.write(time)
%>
Then the input box is set to "Hi there." Can anyone explain this mystery for me? If necessary, I can post the HTML file too, but it's pretty basic and I don't believe that's the problem. TIA!
Edit: I've tried both previewing the files locally in Safari, as well as transferring them to my server and running them over the web.