Closed Bug 77504 Opened 23 years ago Closed 23 years ago

Freeze on javascript:DoNextPage()

Categories

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

x86
All
defect
Not set
normal

Tracking

()

VERIFIED DUPLICATE of bug 76694

People

(Reporter: brian, Assigned: rods)

References

()

Details

(Keywords: hang)

Attachments

(1 file)

Build ID: 2001042304

Steps to Reproduce:
1. go to track.airborne.com/atrknav.asp
2. click "Reference"
3. input Reference: 1010-812000-1090510 and Submit
4. click "More>"

Expected behavior:
loads next 25 search results

Actual behavior:
Mozilla freezes at 100% CPU usage

I'm not sure if this is the Javascript engine or some other component, but the
link shows as javascript:DoNextPage() and I can't view the actual source since
the page is an asp...
Works OK with build ID 2001042420 under WinNT 4.0sp6.

btw you can see the source if you use IE or some browser that actually has a
working "View Source" function. :-) The code for DoNextPage() is:

function DoNextPage() {
	document.FORM2.action = "atrknav.asp"
	document.FORM2.NextFunction.value = "Next Page Pushed"
	document.FORM2.RedirectTo.value = "atrkasum.asp"
	document.FORM2.XMLOut.value = ''
	document.FORM2.submit();
}
I'm seeing this in Linux, build 2001042221.
It could be something to do with the form tag:

<form action="atrkadtl.asp" method="post" id="FORM2" name="FORM2"
LANGUAGE=javascript onsubmit="return FORM2_onsubmit()">

FORM2_onsubmit() is defined as:

function FORM2_onsubmit() {
        btnSubmitAll();
        return false
}


wfm on Win2Ksp1 build 2001042404
Reporter: which build are you using ? 
Please include in every bug report the build ID !
Please read : http://www.mozilla.org/quality/bug-writing-guidelines.html
I already said Build ID: 2001042304.
I do include the Build number in every bug report.
If you had read the bug report, you would see that the very first line is the 
Build ID.
When i follow the steps provided by the reporter i get a popup saying "This
Reference found a large number of shipments unable to track reference" and then
i can't complete step 4 because of that. Reporter are there some more options I
have to enter in before it will allow me to submit or am i missing something?

As for Matti's mistake you must realize we literally read *hundreds* of bug
reports a day and sometimes we make mistakes. please dont take it personally.
Thanks in advance.
Matti: sorry if I was a bit terse - was in a hurry and didn't proofread my reply
for tone before submitting.

It seems they modified the page since yesterday to specifically preclude
searches for Ref # 1010-812000-1090510.  (It's the ref # for the WPP shipment of
WinXP Beta2, which was sent this week to 20,000 people, so they were probably
being overloaded by impatient preview program people...  From the page source:

if (strHoldReferenceNumber == "1010-812000-1090510")
		{
			alert ("This Reference is found on a large number of shipments.  Unable to track
using Shipment Tracker.")
			select_ReferenceNumber()
		} else {
I have a cut down version of the 'Reference' page with the added javascript and
other unnecessary.
Just click on Submit to go to the page with the 'More' link.
I'll attach the html page.
Brian: sorry, I read to fast !
I can´t test it at this moment but thanks for you bug report !!
Hmm...
Using Conor's attachment to access the page, I still get the freeze in
2001042304 but not in 2001042504.  Whatever was the cause has apparently been
changed, but I have no idea what it was.
Browser, not engine --> Form Submission

Confirming bug: hang, 100% CPU, with 2001042304 WinNT build.
Steps to reproduce: as outlined above, using Conor's attachment.
See Conor's instructions at 2001-04-25 14:35.
Assignee: rogerl → rods
Status: UNCONFIRMED → NEW
Component: Javascript Engine → Form Submission
Ever confirmed: true
Keywords: hang
QA Contact: pschwartau → vladimire
The site caused an infinite recursion by doing something equivalent to this:

                 <FORM onSubmit="this.submit()">

When you clicked the link, the form would submit, which triggered 
the onSubmit handler, which caused the form to submit, etc, etc.
So Conor was right on target at 2001-04-25 02:06 above:


function DoNextPage() 
{
 document.FORM2.action = "atrknav.asp"
 document.FORM2.NextFunction.value = "Next Page Pushed"
 document.FORM2.RedirectTo.value = "atrkasum.asp"
 document.FORM2.XMLOut.value = ''
 document.FORM2.submit();
}


------- Additional Comments From Conor Lennon 2001-04-25 02:06 -------

It could be something to do with the form tag:

<form action="atrkadtl.asp" method="post" id="FORM2" name="FORM2"
 LANGUAGE=javascript onsubmit="return FORM2_onsubmit()">




This issue was also uncovered in bug 76694 (at http://ebay.com).
The fix for this bug was checked in on 2001-04-23, which explains
why builds after that date work fine at the current site.
OS: Windows 2000 → All
Here is a synopsis of the function btnSubmitAll():


function btnSubmitAll() 
{
       etc.
       etc.

  var reSubNum;
  reSubNum = 0

       etc.
       etc. 

  if ( etc.)
  {
    reSubNum = reSubNum + 1
  }
       etc.
       etc. 

 if (reSubNum > 0) 
  {
    document.FORM2.submit();
  }
  else 
  {
    alert('No valid airbills entered.');
  }
}



The line document.FORM2.submit() gets triggered easily here,
causing the infinite recursion with 



<form action="atrkadtl.asp" method="post" id="FORM2" name="FORM2"
 LANGUAGE=javascript onsubmit="return FORM2_onsubmit()">


function FORM2_onsubmit() 
{
  btnSubmitAll();
  return false
}

*** This bug has been marked as a duplicate of 76694 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Brian, this was a very well-written bug report! I would also like to 
praise everyone else who contributed, for such fine work.

Also see bug 77271, "Need to filter recursive events to prevent crashes".
This was generated by the issues raised in this bug and bug 76694.
Verifying duplicate
Status: RESOLVED → VERIFIED
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: