Closed Bug 100638 Opened 23 years ago Closed 23 years ago

WRMB: hourglass never goes away on JS generated content

Categories

(Core :: DOM: Core & HTML, defect)

x86
All
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 81980
mozilla1.0.1

People

(Reporter: barrowma, Assigned: jst)

References

()

Details

(Whiteboard: [bugscape: 6396])

From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.2) Gecko/20010821
Netscape6/6.1
BuildID:    2001091703

The form on this page (http://www.windsorvineyards.com/label.html) creates a
popup window when you submit.  The HTML content on the popup is created via
document.write()'s.  The hourglass never goes away even though the content is
written completely.

Reproducible: Always
Steps to Reproduce:
1. Go to http://www.windsorvineyards.com/label.html
2. Select some entries in the pulldown lists or enter values in the text fields
(the generated wine label will show the value in the text field iff the pulldown
is not set to some non-empty value)
3. Submit the form by clicking "View Label"

Actual Results:  A popup appears with the correct content, but the hourglass
cursor icon remains, as if content is still loading.

Expected Results:  The cursor should return to its normal state (arrow icon).

The relevant JS is in the following URL: http://www.windsorvineyards.com/vlable.js
Browser, not engine --> DOM Level 0      OS : Win98 --> All
Not sure if this is the right component; please reassign as necessary; thanks.


The "View Label" button is as follow: 

<INPUT TYPE="button" VALUE="View Label" onClick="return go_now()">


function go_now()
{

var total = 0;
var msg1;
var msg2;
var msg3;

var f = window.document.myform;

// CHECKS TO SEE IF PERSONALIZED LABEL OPTION IS SELECTED           

if (f.Selone.options[f.Selone.selectedIndex].value != "none")
{ 
  msg1 = f.Selone.options[f.Selone.selectedIndex].value;
}
else
{      
  msg1 = f.Firstbox.value;
}

if (f.Seltwo.options[f.Seltwo.selectedIndex].value != "none")
{ 
  msg2 = f.Seltwo.options[f.Seltwo.selectedIndex].value;
}
else
{      
  msg2 = f.Secondbox.value;
}

if (f.Selthree.options[f.Selthree.selectedIndex].value != "none")
{ 
  msg3 = f.Selthree.options[f.Selthree.selectedIndex].value;
}
else
{      
  msg3 = f.Thirdbox.value;
}


if (f.Italics.checked)
{
var d = window.open("", "MyWin", "resizable,width=500,height=500").document;

d.write('<html><head><title>wine Label</title></head>');
d.write('<body bgcolor="#ffffff" link="#000000" marginwidth="0" topmargin="0" 
leftmargin="0" marginheight="0" onblur="window.close()">');
d.write('<br><br>');
d.write('<center>');
d.write('<table background="images/labelbg.gif" border="1" cellspacing=0 
cellpadding=0>');
d.write('<tr><td align="center">');
d.write('<table border="0" width="394" cellspacing=0 cellpadding=0>');
d.write('<tr><td align="center">');
d.write('<img src="images/bstrip.gif" width="394" height="10"><br><img 
src="images/toplabel.gif" width="244" height="136">');
d.write('</td></tr>');
d.write('<tr><td align="center"><br>');
d.write('<font size="3"><i>'+msg1);
d.write('</i></font>');
d.write('</td></tr>');
d.write('<tr><td align="center">');
d.write('<font size=3><i>'+msg2);
d.write('</i></font>');
d.write('</td></tr>');
d.write('<tr><td align="center">');
d.write('<font size=3><i>'+msg3);
d.write('</i></font>');
d.write('</td></tr>');
d.write('<tr><td align="center">');
d.write('<br><img src="images/labelbot.gif" width="226" height="82">');
d.write('</td></tr></table>');
d.write('</td></tr></table>');
d.write('<br><br>');
d.write('<table border="2" bgcolor="#cccccc" cellspacing=0 cellpadding=2>');
d.write('<tr><td align="center" valign="top">');
d.write('<a href="javascript:window.close()"><font size=3>Click Here To Revise 
Or Make A New Label</font></a>');
d.write('</td></tr></table>');
d.write('<br>');
d.write('</center>');
d.write('</body>');
d.write('</html>');
d.close;

return true;
}

else
{
var d = window.open("", "MyWin", "resizable,width=500,height=500").document;

d.write('<html><head><title>wine Label</title></head>');
d.write('<body bgcolor="#ffffff" link="#000000" marginwidth="0" topmargin="0" 
leftmargin="0" marginheight="0" onblur="window.close()">');
d.write('<br><br>');
d.write('<center>');
d.write('<table background="images/labelbg.gif" border="1" cellspacing=0 
cellpadding=0>');
d.write('<tr><td align="center">');
d.write('<table border="0" width="394" cellspacing=0 cellpadding=0>');
d.write('<tr><td align="center">');
d.write('<img src="images/bstrip.gif" width="394" height="10"><br><img 
src="images/toplabel.gif" width="244" height="136">');
d.write('</td></tr>');
d.write('<tr><td align="center"><br>');
d.write('<font size=3>'+msg1);
d.write('</font>');
d.write('</td></tr>');
d.write('<tr><td align="center">');
d.write('<font size=3>'+msg2);
d.write('</font>');
d.write('</td></tr>');
d.write('<tr><td align="center">');
d.write('<font size=3>'+msg3);
d.write('</font>');
d.write('</td></tr>');
d.write('<tr><td align="center">');
d.write('<br><img src="images/labelbot.gif" width="226" height="82">');
d.write('</td></tr></table>');
d.write('</td></tr></table>');
d.write('<br><br>');
d.write('<table border="2" bgcolor="#cccccc"cellspacing=0 cellpadding=2>');
d.write('<tr><td align="center">');
d.write('<a href="javascript:window.close()"><font size=3>Click Here To Revise 
Or Make A New Label</font></a>');
d.write('</td></tr>');
d.write('</table>');
d.write('<br>');
d.write('</center>');
d.write('</body>');
d.write('</html>');
d.close;

return true;

 }    
}
Assignee: rogerl → jst
Component: Javascript Engine → DOM Level 0
OS: Windows 98 → All
QA Contact: pschwartau → desale
  d.write(...);
  ...
  d.close;

that should be d.close();, i.e. missing parens. That's why we never finish
loading this that page. There's not much we can do about this, and given that
this doesn't actually make the site unusable I'm marking this as WONTFIX, if you
disagree, please reopen and reassign to evangelism.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → WONTFIX
Marking Verified Wontfix -
Status: RESOLVED → VERIFIED
If there is no JS left to execute, shouldn't the hourglass go away, regardless
of the incorrect syntax of the final statement?
Status: VERIFIED → REOPENED
Resolution: WONTFIX → ---
Keywords: topembed
adding WRMB
Summary: hourglass never goes away on JS generated content → WRMB: hourglass never goes away on JS generated content
adding bugscape ref
Whiteboard: [bugscape: 6396]
We don't know that there is no more JS left to execute, we have no idea who has
references to the document, so we can't check if there's more JS about to
execute or not. We don't have a solution for this, we might be able to fix this
with fireing off a timer when document.write() is called, and then after some
time if no more calls have been made to document.write() and document.close()
was not called we could close the document, or something like that. I don't see
why this would get high priority tho, are there top 100 sites that show this
problem?
Status: REOPENED → ASSIGNED
Target Milestone: --- → mozilla1.0
Blocks: 64833
removing topembed
Keywords: topembed
Bugs targeted at mozilla1.0 without the mozilla1.0 keyword moved to mozilla1.0.1 
(you can query for this string to delete spam or retrieve the list of bugs I've 
moved)
Target Milestone: mozilla1.0 → mozilla1.0.1

*** This bug has been marked as a duplicate of 81980 ***
Status: ASSIGNED → RESOLVED
Closed: 23 years ago23 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.