Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Newbie to ASP

Reply
Thread Tools

Newbie to ASP

 
 
Andy
Guest
Posts: n/a
 
      10-05-2004
After the server processes the page, the server sends a text document
down to the browser. I'm wondering how (in what order) does the
browser interpret the text document. Does it do the HTML first and
then anything between the script tags or is it the other way around.

I would appreciate if someone can shed some light on this.

Thank you,
Anand.
 
Reply With Quote
 
 
 
 
Evertjan.
Guest
Posts: n/a
 
      10-05-2004
Andy wrote on 05 okt 2004 in microsoft.public.inetserver.asp.general:

> After the server processes the page, the server sends a text document
> down to the browser. I'm wondering how (in what order) does the
> browser interpret the text document. Does it do the HTML first and
> then anything between the script tags or is it the other way around.
>


ASP does not know or care what a browser does with the document.

So you are asking the wrong NG.
As you are a self proclaimed ASP newbee we (? I hope) forgive you.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

 
Reply With Quote
 
 
 
 
Andy Kasotia
Guest
Posts: n/a
 
      10-05-2004
Evertjan,

You probably misunderstood my question. I understand that ASP doesn't
know or care about what the browser does. That was not my question. I'm
just asking how the browser interprets the text document sent by the
server. What code in the text document does it execute first, the HTML
or the Scripts?

Thank you,
Andy.



*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Bob Barrows [MVP]
Guest
Posts: n/a
 
      10-05-2004
Andy Kasotia wrote:
> Evertjan,
>
> You probably misunderstood my question. I understand that ASP doesn't
> know or care about what the browser does. That was not my question.
> I'm just asking how the browser interprets the text document sent by
> the server.


Which makes this a message more suited for a browser newsgroup, doesn't it?
Nothing to do with server-side ASP code, which is the focus of this
newsgroup.

> What code in the text document does it execute first, the
> HTML or the Scripts?
>


I suspect the answer to this may be dependant on the browser that is being
used.

I really don't know the answer to this for sure, but my first thought would
be to go search the library at msdn.microsoft.com/library in the Web
Development section. This may get you an IE-specific answer. For Mozilla and
Netscape, you should find newsgroups devoted to those browsers. Or try
comp.lang.javascript.

Bob Barrows
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


 
Reply With Quote
 
Evertjan.
Guest
Posts: n/a
 
      10-05-2004
Andy Kasotia wrote on 05 okt 2004 in
microsoft.public.inetserver.asp.general:

> You probably misunderstood my question. I understand that ASP doesn't
> know or care about what the browser does. That was not my question. I'm
> just asking how the browser interprets the text document sent by the
> server. What code in the text document does it execute first, the HTML
> or the Scripts?


Hi, Andy,

I don't think I misunderstood.

You are asking what a browser does to a ASP file?

A: The ASP file does not reach the browser.

Or are you asking what a browser does
to the rendered html/text/clientside-code?

A: That is off topic, since this is an ASP [=serverside code] NG.

I would suggest you ask a clientside group.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

 
Reply With Quote
 
Stephanie Stowe
Guest
Posts: n/a
 
      10-05-2004

"Andy Kasotia" <(E-Mail Removed)> wrote in message
news:e9I$(E-Mail Removed)...
> Evertjan,
>
> You probably misunderstood my question. I understand that ASP doesn't
> know or care about what the browser does. That was not my question. I'm
> just asking how the browser interprets the text document sent by the
> server. What code in the text document does it execute first, the HTML
> or the Scripts?
>


There are 2 types of script, script that is intended to run on the client
and scripts intended to run on the server. If I have

<%
response.write "<P>This is a paragraph.</P>"
%>

What is actually sent to the browser is

<P>This is a paragraph.</P>

If I put

<script language=javascript>
function testMe() {
window.alert("I am a test");
}

then this script would be executed according to how it was constructed. In
this case, this is a function and would need to be called by something else,
body onload, button click or something.

The server side code is executed and resultant text is sent to the browser.

Does this answer your question?
}

> Thank you,
> Andy.
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
Dave Anderson
Guest
Posts: n/a
 
      10-05-2004
Andy wrote:
> After the server processes the page, the server sends a text document
> down to the browser. I'm wondering how (in what order) does the
> browser interpret the text document. Does it do the HTML first and
> then anything between the script tags or is it the other way around.


Small detail here -- the server does not necessarily send the browser a text
file:

Response.Redirect(SomeOtherURL)
Response.BinaryWrite(BinaryContent)

As for [content-type=text/html], the browser parses the document in the same
order as it would any *static* HTML document.



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.


 
Reply With Quote
 
Andy Kasotia
Guest
Posts: n/a
 
      10-05-2004
Hi Stephanie,

Thank you for replying to my message. I understand about the two scripts
you've mentioned. What I was wondering about is that after the Server
has processed the Request and it sends down a rendered html/text file to
the browser, the text file has HTML code as well as code that is
surrounded by <SCRIPT>...</SCRIPT> tags. I just want to know the
sequence in which the browser interprets this text file...does it do all
the HTML first and then do whatever is between the <SCRIPT> tags or is
it the other way around or does it do top to bottom?

I understand that this is probably not a question for this newsgroup but
this is an explanation of what I'm asking since you replied to my
message. If you wish to not answer since I'm in the wrong newsgroup,
I'll understand that.

Thanks though for your response.
Andy.




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Bob Lehmann
Guest
Posts: n/a
 
      10-05-2004
Top to Bottom.

Bob Lehmann

"Andy Kasotia" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Stephanie,
>
> Thank you for replying to my message. I understand about the two scripts
> you've mentioned. What I was wondering about is that after the Server
> has processed the Request and it sends down a rendered html/text file to
> the browser, the text file has HTML code as well as code that is
> surrounded by <SCRIPT>...</SCRIPT> tags. I just want to know the
> sequence in which the browser interprets this text file...does it do all
> the HTML first and then do whatever is between the <SCRIPT> tags or is
> it the other way around or does it do top to bottom?
>
> I understand that this is probably not a question for this newsgroup but
> this is an explanation of what I'm asking since you replied to my
> message. If you wish to not answer since I'm in the wrong newsgroup,
> I'll understand that.
>
> Thanks though for your response.
> Andy.
>
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
Stephanie Stowe
Guest
Posts: n/a
 
      10-05-2004

"Andy Kasotia" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi Stephanie,
>
> Thank you for replying to my message. I understand about the two scripts
> you've mentioned. What I was wondering about is that after the Server
> has processed the Request and it sends down a rendered html/text file to
> the browser, the text file has HTML code as well as code that is
> surrounded by <SCRIPT>...</SCRIPT> tags. I just want to know the
> sequence in which the browser interprets this text file...does it do all
> the HTML first and then do whatever is between the <SCRIPT> tags or is
> it the other way around or does it do top to bottom?
>


Basically, the answer to this is that the browser expects things to come to
it in a certain standard depending on the browser. The HTML contains
elements and those elements may have events. So <Body onload=testMe();> the
testMe() function will be *executed* when the body loads. You probably need
a short course in client-side scripting.

The browser is sort of a dumb animal. It does not so much evaluate as react.
So it is not like the browser parses the page in an intelligent way.

I hope I did not confuse more than I helped.



> I understand that this is probably not a question for this newsgroup but
> this is an explanation of what I'm asking since you replied to my
> message. If you wish to not answer since I'm in the wrong newsgroup,
> I'll understand that.
>
> Thanks though for your response.
> Andy.
>
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Newbie: using asp.net 2.0 profile in an ASP.NET web service Navin Mishra ASP .Net 4 10-20-2006 03:22 PM
newbie: ASP Vs ASP.NET Jacky Luk ASP .Net 5 07-29-2005 11:08 AM
Newbie question: migrating "global variables" from ASP to ASP.NET =?Utf-8?B?QW5kcmVhcyBIb2ZtYW5u?= ASP .Net 2 04-18-2005 01:53 PM
Newbie Question: Asp Classic and ASP.NET running on IIS5 side-by-side ? Bob [BVP] ASP .Net 5 08-09-2004 01:55 PM
Call ASP.NET DLL from ASP 3.0 - Newbie Mark Reichard ASP .Net 5 07-13-2004 04:56 PM



Advertisments