Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 09:53 AM
Bob Murdoch
Guest
 
Posts: n/a
Default Page load never ends

I have a relatively simple ASP page written in javascript, that basically
contains a table, a dropdown list populated by a query, and a button.

The problem is that when first navigating to this page, the progress bar in
IE only shows the page as being 10 or 20% complete, even though the page has
fully loaded.

I originally had a mix of html/jscript/html (in that order), and tried
changing that to html/jscript just to see if the conversion from static to
dynamic to static code was causing a problem, but with no effect.

I have run the output of this page thru two or three different html
validators, none of which show a problem with the final code.

I'm using IIS on W2k server, and IE6 or IE5.5 on client.

tia for any pointers,

Bob M..


  #2  
Old July 19th, 2005, 09:53 AM
John Beschler
Guest
 
Posts: n/a
Default Page load never ends

Let me be the first to say: Please post the relevant code.


[color=blue]
>-----Original Message-----
>I have a relatively simple ASP page written in[/color]
javascript, that basically[color=blue]
>contains a table, a dropdown list populated by a query,[/color]
and a button.[color=blue]
>
>The problem is that when first navigating to this page,[/color]
the progress bar in[color=blue]
>IE only shows the page as being 10 or 20% complete, even[/color]
though the page has[color=blue]
>fully loaded.
>
>I originally had a mix of html/jscript/html (in that[/color]
order), and tried[color=blue]
>changing that to html/jscript just to see if the[/color]
conversion from static to[color=blue]
>dynamic to static code was causing a problem, but with no[/color]
effect.[color=blue]
>
>I have run the output of this page thru two or three[/color]
different html[color=blue]
>validators, none of which show a problem with the final[/color]
code.[color=blue]
>
>I'm using IIS on W2k server, and IE6 or IE5.5 on client.
>
>tia for any pointers,
>
>Bob M..
>
>
>.
>[/color]
  #3  
Old July 19th, 2005, 09:53 AM
Bob Murdoch
Guest
 
Posts: n/a
Default Re: Page load never ends


"John Beschler" <giles@geewhiz.com> wrote in message
news:0c2a01c3b8de$e3b5d160$a101280a@phx.gbl...[color=blue]
> Let me be the first to say: Please post the relevant code.[/color]

<G>.

I was going to, but didn't want to waste anyone's bandwidth if this was a
common problem. Here it is:

<%@ language="JavaScript"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<!--#include virtual="/BTRC/Shared/Security/AuthenticateUser.asp" -->
<!--#include virtual="/BTRC/Shared/Server/DbLibrary.asp" -->
<link REL="stylesheet" TYPE="text/css"
HREF="/BTRC/Shared/Style/Style.css">
<link REL="stylesheet" TYPE="text/css"
HREF="/BTRC/Shared/Style/BgStyles.css">
<link REL="stylesheet" TYPE="text/css" HREF="Style/Style.css">
</head>
<body leftmargin=10 topmargin=10>
<script language="javascript" src="scripts/titleband.js"
type=text/javascript></script>
<script language='javascript'>
function DoCarrierSelectChange(ASelect)
{
document.URL = "SaveCarrier.asp" + ASelect.value;
}
ClearTitleHtml();
AddTitleHtml("<span style='position:absolute;left:10;'>Change
Carrier</span>");
</script>
<center>
<table border='0' cellpadding='0' cellspacing='0'>
<tr>
<td>
<table class='inner' border='0' cellpadding='2' cellspacing='1'>
<tr class='SUB_HEADER_ONE'>
<td colspan='2'>Change Carrier
<%
var vCarrierName = String(Request.Cookies("CarrierName"));
if (vCarrierName != "")
Response.write(" from " + vCarrierName);
%>
</td>
</tr>
<tr height="40" class='data_light'>
<td>
<table height='100%'>
<tr>
<td>Select a Carrier</td><td>
<%
Response.write('Session("securitytoken")=' + Session("SecurityToken") +
'<BR>');
Response.write("<select id='CarrierSelect'>\n");
ConnectDb();
BeginTrans();
vSQL =
'select '+
' C.carrier_id as ID, C.carrier_name as CName '+
'from '+
' security_token ST '+
' join user_carrier UC on UC.user_id = ST.user_id '+
' join carrier C on c.carrier_id = uc.carrier_id '+
'where '+
' st.security_token_id=' + Session("SecurityToken") + ' ' +
'order by '+
' C.carrier_name';
vCarrierList = ExecSQL(vSQL);
if (vCarrierList != null)
{
while (!vCarrierList.EOF)
{
Response.write(
"<option value='?id=" +
vCarrierList.Fields("ID").Value +
"&name=" +
vCarrierList.Fields("CName").Value);

if (String(vCarrierList.Fields("ID").Value) ==
String(Request.Cookies("CarrierId")))
Response.write("' selected>");
else
Response.write("'>");
Response.write(vCarrierList.Fields("CName").Value) ;
Response.write("</option>\n");
vCarrierList.Move(1);
}
}
else
Response.write('<option selected>Debug: Null result set</option>');
Commit();
DisconnectDb();
Response.write('</select>\n');
Response.write(' </td>\n');
Response.write(' </tr>\n');
Response.write(' </table>\n');
Response.write(' </td>\n');
Response.write(' </tr>\n');
Response.write(' </table>\n');
Response.write(' </td>\n');
Response.write(' </tr>\n');
Response.write(' <tr><td height="10"></td></tr>\n');
Response.write(' <tr height="34">\n');
Response.write(' <td colspan="2" class="buttons"
align="right">\n');
Response.write(' <button id=OkButton
onclick="DoCarrierSelectChange(CarrierSelect);"
style="width:75;margin-right:5;margin-left:5">Ok</button>\n');
Response.write(' </td>\n');
Response.write(' </tr>\n');
Response.write(' </table>\n');
Response.write(' </center>\n');
Response.write('</body>\n');
Response.write('</html>\n');
Response.End;
%>


  #4  
Old July 19th, 2005, 09:53 AM
Dave Anderson
Guest
 
Posts: n/a
Default Re: Page load never ends

"Bob Murdoch" wrote:[color=blue]
>
> ...
> Response.End;[/color]

That should be Response.End(), though you could just leave this off.

Could you post the last few lines of generated source code?


--
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.


  #5  
Old July 19th, 2005, 09:53 AM
William Morris
Guest
 
Posts: n/a
Default Re: Page load never ends

Bob,

I don't remember where I read this, but this is a known issue with IE.
Pages that contain client-side javascript will sometimes cause IE to get
"confused", and the progress bar never stops updating. There's nothing
wrong with your programming, and the page is finished loading.

I'm team lead on a rather large intranet project, and so far we haven't
found a workaround for it.

Best regards,

- Wm


--
William Morris
Product Development, Seritas LLC

"Bob Murdoch" <ram_re_move_5@erols.com> wrote in message
news:OaMFajNuDHA.1764@TK2MSFTNGP10.phx.gbl...[color=blue]
> I have a relatively simple ASP page written in javascript, that basically
> contains a table, a dropdown list populated by a query, and a button.
>
> The problem is that when first navigating to this page, the progress bar[/color]
in[color=blue]
> IE only shows the page as being 10 or 20% complete, even though the page[/color]
has[color=blue]
> fully loaded.
>
> I originally had a mix of html/jscript/html (in that order), and tried
> changing that to html/jscript just to see if the conversion from static to
> dynamic to static code was causing a problem, but with no effect.
>
> I have run the output of this page thru two or three different html
> validators, none of which show a problem with the final code.
>
> I'm using IIS on W2k server, and IE6 or IE5.5 on client.
>
> tia for any pointers,
>
> Bob M..
>
>[/color]


  #6  
Old July 19th, 2005, 09:53 AM
Dave Anderson
Guest
 
Posts: n/a
Default Re: Page load never ends

"William Morris" wrote:[color=blue]
>
> ...There's nothing wrong with your programming, and
> the page is finished loading...[/color]

I'm just curious -- have you ever tried document.close() ?


--
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.


  #7  
Old July 19th, 2005, 09:53 AM
William Morris
Guest
 
Posts: n/a
Default Re: Page load never ends

Shoot, I've never even heard of document.close(). What is it? The
client-side equivalent of "response.end()?"

Incidentally, we have started adding response.end as the last line of every
top level ASP page. No results to report yet.

"Dave Anderson" <GTSPXOESSGOQ@spammotel.com> wrote in message
news:OUD8SaPuDHA.3116@tk2msftngp13.phx.gbl...[color=blue]
> "William Morris" wrote:[color=green]
> >
> > ...There's nothing wrong with your programming, and
> > the page is finished loading...[/color]
>
> I'm just curious -- have you ever tried document.close() ?
>
>
> --
> Dave Anderson
>
> Unsolicited commercial email will be read at a cost of $500 per message.[/color]
Use[color=blue]
> of this email address implies consent to these terms. Please do not[/color]
contact[color=blue]
> me directly or ask me to contact you directly for assistance. If your
> question is worth asking, it's worth posting.
>
>[/color]


  #8  
Old July 19th, 2005, 09:53 AM
Aaron Bertrand - MVP
Guest
 
Posts: n/a
Default Re: Page load never ends

> Incidentally, we have started adding response.end as the last line of
every[color=blue]
> top level ASP page.[/color]

I'd be very surprised if that solved anything... the issue is with the
client-side code, not the server-side code.

--
Aaron Bertrand
SQL Server MVP
http://www.aspfaq.com/


  #9  
Old July 19th, 2005, 09:53 AM
Bob Murdoch
Guest
 
Posts: n/a
Default Re: Page load never ends

"Dave Anderson" <GTSPXOESSGOQ@spammotel.com> wrote in message
news:uU59q7OuDHA.2360@TK2MSFTNGP10.phx.gbl...[color=blue]
> Could you post the last few lines of generated source code?[/color]

Absolutely. I'm assuming you mean the html source from the browser?

</select>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr><td height="10"></td></tr>
<tr height="34">
<td colspan="2" class="buttons" align="right">
<button id=OkButton
onclick="DoCarrierSelectChange(CarrierSelect);"
style="width:75;margin-right:5;margin-left:5">Ok</button>
</td>
</tr>
</table>
</center>
</body>
</html>


  #10  
Old July 19th, 2005, 09:53 AM
Dave Anderson
Guest
 
Posts: n/a
Default Re: Page load never ends

"William Morris" wrote:[color=blue]
>
> Shoot, I've never even heard of document.close(). What is it?[/color]

http://www.w3.org/TR/2000/WD-DOM-Lev...ml#ID-98948567
http://msdn.microsoft.com/workshop/a...ds/close_1.asp

[color=blue]
> The client-side equivalent of "response.end()?"[/color]

Sort of. Response.End() flushes the response buffer and ends all variable
scope. document.close() closes the document stream and forces rendering. If
any of your included client-side JScript uses document.write(), you should
use document.close() to close the stream.


--
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.


  #11  
Old July 19th, 2005, 09:53 AM
Dave Anderson
Guest
 
Posts: n/a
Default Re: Page load never ends

I wrote:[color=blue]
>
> If any of your included client-side JScript uses
> document.write(), you should use document.close()
> to close the stream.[/color]

Perhaps *should* is too strong a word. You *can* use it to close the stream.
I was just curious to know if doing so had any effect. I imagine you have to
be careful about where you use it, as it would seem to require that nothing
follow it. Perhaps in an ONLOAD handler?


--
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.


 

Bookmarks

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles