1. Browser sends HTTP request to Server.
2. Server gives the Request to ASP.
3. ASP logic runs to prepare an HTTP Response.
4. ASP gives the Response to the Server.
5. Server returns the Response to the Browser.
6. Browser renders the Response as a web page.
By the time you get to step 6, the ASP is done running and the Server has moved on to some other task.
The ASP doesnt know the difference between HTML, CSS, and client-side script.
Suppose the ASP looks like this...[tt]
<body style="color:red;" onLoad="alert('The date is: <%= cStr(Date) %>');">[/tt]
What the browser actually receives will look like this:[tt]
<body style="color:red;" onLoad="alert('The date is: 3/26/2007');">[/tt]
As far as the ASP is concerned, this is all plain text that will be sent to the Browser as an HTTP Response.
... but the Browser will see:
An HTML element: [blue][tt]<body>[/tt][/blue]
CSS instructions: [blue][tt]color:red;[/tt][/blue]
An DOM event with client-side JavaScript: [blue][tt]onLoad="alert('The date is: 3/26/2007');"[/tt][/blue]
It is probably more trouble than its worth for a date but...
Many popular browsers include a feature for parsing XML. Included in this code is the ability to request addition chunks of XML from the server WITHOUT reloading the page. It is possible to take advantage of this feature to create a crude remote procedure call. There is even an acronym for this technique: AJAX. See google for details.
Here is my real issue, I am trying to find a suitable work around for displaying the copyright 1997 - 2007. My issue is I can no longer use AJAX or javascript to do this. I have a 100+ pages to update. So I am looking of alternatives to this like reading in a file to html to grab the 2007. Or set a script tag to call asp like javascript.... Did I explain it okay?
Perhaps an "include" file would be good. This allows you to insert the same file into multiple pages. If the data changes in the future, you only need to change the one file, and the effect will be seen on all pages.
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.