Page load never ends

Discussion in 'ASP General' started by Bob Murdoch, Dec 2, 2003.

  1. Bob Murdoch

    Bob Murdoch Guest

    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..
     
    Bob Murdoch, Dec 2, 2003
    #1
    1. Advertising

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



    >-----Original Message-----
    >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..
    >
    >
    >.
    >
     
    John Beschler, Dec 2, 2003
    #2
    1. Advertising

  3. Bob Murdoch

    Bob Murdoch Guest

    "John Beschler" <> wrote in message
    news:0c2a01c3b8de$e3b5d160$...
    > Let me be the first to say: Please post the relevant code.


    <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;
    %>
     
    Bob Murdoch, Dec 2, 2003
    #3
  4. "Bob Murdoch" wrote:
    >
    > ...
    > Response.End;


    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.
     
    Dave Anderson, Dec 2, 2003
    #4
  5. 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" <> wrote in message
    news:...
    > 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..
    >
    >
     
    William Morris, Dec 2, 2003
    #5
  6. "William Morris" wrote:
    >
    > ...There's nothing wrong with your programming, and
    > the page is finished loading...


    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.
     
    Dave Anderson, Dec 2, 2003
    #6
  7. 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" <> wrote in message
    news:...
    > "William Morris" wrote:
    > >
    > > ...There's nothing wrong with your programming, and
    > > the page is finished loading...

    >
    > 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.
    >
    >
     
    William Morris, Dec 2, 2003
    #7
  8. > Incidentally, we have started adding response.end as the last line of
    every
    > top level ASP page.


    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/
     
    Aaron Bertrand - MVP, Dec 2, 2003
    #8
  9. Bob Murdoch

    Bob Murdoch Guest

    "Dave Anderson" <> wrote in message
    news:...
    > Could you post the last few lines of generated source code?


    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>
     
    Bob Murdoch, Dec 2, 2003
    #9
  10. "William Morris" wrote:
    >
    > Shoot, I've never even heard of document.close(). What is it?


    http://www.w3.org/TR/2000/WD-DOM-Level-1-20000929/level-one-html.html#ID-98948567
    http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/close_1.asp


    > The client-side equivalent of "response.end()?"


    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.
     
    Dave Anderson, Dec 2, 2003
    #10
  11. I wrote:
    >
    > If any of your included client-side JScript uses
    > document.write(), you should use document.close()
    > to close the stream.


    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.
     
    Dave Anderson, Dec 2, 2003
    #11
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Wardeaux

    The fun never ends...

    Wardeaux, Apr 27, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    306
    Wardeaux
    Apr 27, 2004
  2. Soren Kuula
    Replies:
    1
    Views:
    457
    Henry S. Thompson
    Dec 1, 2005
  3. Kevin
    Replies:
    4
    Views:
    430
    Irrwahn Grausewitz
    Oct 17, 2003
  4. Alan
    Replies:
    6
    Views:
    1,608
  5. et
    Replies:
    0
    Views:
    187
Loading...

Share This Page