Closed
Bug 61385
Opened 24 years ago
Closed 23 years ago
when submitting two forms from JS only one succeeds
Categories
(Core :: DOM: Core & HTML, defect, P3)
Tracking
()
VERIFIED
FIXED
mozilla0.9.2
People
(Reporter: rhusted, Assigned: rpotts)
References
()
Details
(Keywords: testcase)
Login at the above site (username and password are already completed). Click on
the EC Manager radio button and then on the "Login" button. Now click on any of
the top tabs. You should see the tab in the top frame change to highlighted and
you should see a new page in the bottom frame. The page in the bottom frame
does not appear and the following JavaScript error is generated twice:
Error: focusedWindow.location has no properties
Source File: chrome://navigator/content/navigator.js
Line: 118 Column: 0
The page submits two forms... each to a different frame. This site works in
both MSIE and Navigator 4.7x, but not in Mozilla or Netscape 6.
This bug completely breaks our application in Netscape 6 / Mozilla M18.
Thank you for your help in fixing this bug -- Netscape 6 ROCKS!
- Robert =)
Comment 1•24 years ago
|
||
Confirming bug on Linux as well as WinNT; changing OS to "All".
I don't think the problem is the error mentioned above:
Error: focusedWindow.location has no properties
Source File: chrome://navigator/content/navigator.js
Line: 118 Column: 0
You do get this error in the JavaScript console on WinNT after you login as
described above, but not on Linux. In either case, however, you arrive
successfully at this URL:
http://pasteur.requisite.com/servlet/BugsEye
which has the following structure:
Frame 1:
http://pasteur.requisite.com/servlet/BugsEye?cmd=main_view&framecmd=contents&tit
le=&role=&activetab=&mode=ecmanager&menutype=tab
Form 1:
Action URL: http://pasteur.requisite.com/servlet/BugsEye
Encoding: application/x-www-form-urlencoded (default)
Method: Post
Form 2:
Action URL: http://pasteur.requisite.com/servlet/BugsEye
Encoding: application/x-www-form-urlencoded (default)
Method: Post
Image: http://pasteur.requisite.com/requisite/bugseye_txt.gif
Image: http://pasteur.requisite.com/requisite/tabs/tab_blk_lft.gif
Image: http://pasteur.requisite.com/requisite/tabs/tab_blk_ctr.gif
Image: http://pasteur.requisite.com/requisite/tabs/tab_blk_ctr.gif
Image: http://pasteur.requisite.com/requisite/tabs/tab_blk_ctr.gif
Image: http://pasteur.requisite.com/requisite/tabs/tab_blk_rt_end.gif
Frame 2: http://pasteur.requisite.com/requisite/home.htm
Background Image: http://pasteur.requisite.com/requisite/req_bg.gif
Image: http://pasteur.requisite.com/requisite/req_logo_anim.gif
Image: http://pasteur.requisite.com/requisite/home.gif
Now here is the HTML for the Frame 1 above:
<HTML>
<BASE HREF="http://pasteur.requisite.com/servlet/"></BASE>
<HEAD>
<LINK rel=STYLESHEET href="http:/requisite/requisite_style.css"
type="text/css">
<TITLE>Catalog:</TITLE>
<SCRIPT language="JavaScript"
src="http://pasteur.requisite.com/requisite/html/javascript/requisite.js">
</SCRIPT>
<SCRIPT language="JavaScript">
function openPage( url, tabnum, role, parentRole ) {
parent.mainframe.location.replace( url );
document.mainview.role.value = role;
document.mainview.activetab.value = tabnum;
document.mainview.parentRole.value = parentRole;
document.mainview.submit();
}
function openModule( cmd, tabnum, role, parentRole ) {
document.mainview.role.value = role;
document.mainview.activetab.value = tabnum;
document.mainview.parentRole.value = parentRole;
document.module.cmd.value= cmd;
document.module.submit();
document.mainview.submit();
}
function setTab( role, activetab, parentRole ) {
document.mainview.role.value = role;
document.mainview.activetab.value = activetab;
document.mainview.parentRole.value = parentRole;
document.mainview.submit();
}
</SCRIPT>
</HEAD>
<BODY bgcolor=#909090 leftmargin=0 topmargin=0 marginwidth=0 marginheight=0
leftmargin="0" topmargin="0" marginheight="0" marginwidth="0">
<table width=100% height=100% cellpadding=0 cellspacing=0 vspace=0
valign=bottom>
<tr valign=bottom>
<td background=/requisite/reqmetal.gif valign=bottom>
<img src=/requisite/bugseye_txt.gif><br>
<table cellspacing="0" cellpadding="0" border="0"><tr
valign="bottom"><td><img src="/requisite/tabs/tab_blk_lft.gif"
border="0"></td><td background="/requisite/tabs/tab_blk_bck.gif" align="center"
valign="center" nowrap><a class="tabBak"
href="javascript:setTab(1,-1,0);">Administration</a></td><td><img
src="/requisite/tabs/tab_blk_ctr.gif" border="0"></td><td
background="/requisite/tabs/tab_blk_bck.gif" align="center" valign="center"
nowrap><a class="tabBak" href="javascript:setTab(2,-1,0);">Users &
Views</a></td><td><img src="/requisite/tabs/tab_blk_ctr.gif" border="0"></td><td
background="/requisite/tabs/tab_blk_bck.gif" align="center" valign="center"
nowrap><a class="tabBak" href="javascript:setTab(16,-1,0);">Catalog
Structure</a></td><td><img src="/requisite/tabs/tab_blk_ctr.gif"
border="0"></td><td background="/requisite/tabs/tab_blk_bck.gif" align="center"
valign="center" nowrap><a class="tabBak"
href="javascript:setTab(4,-1,0);">Products</a></td><td><img
src="/requisite/tabs/tab_blk_rt_end.gif" border="0"></td></tr></table>
</td>
</tr>
</table>
<SCRIPT language="JavaScript">
parent.mainframe.location.replace( '/requisite/home.htm' );
</SCRIPT>
<FORM name="mainview" method="POST"
action="http://pasteur.requisite.com/servlet/BugsEye">
<input type=hidden name="menutype" value="tab">
<input type=hidden name="mode" value="ecmanager">
<input type=hidden name="cmd" value="main_view">
<input type=hidden name="framecmd" value="contents">
<input type=hidden name="title" value="">
<input type=hidden name="role" value="">
<input type=hidden name="parent" value="">
<input type=hidden name="parentRole" value="">
<input type=hidden name="activetab" value="">
</FORM>
<FORM name="module" target="mainframe" method="POST"
action="http://pasteur.requisite.com/servlet/BugsEye">
<input type=hidden name="cmd" value="main_view">
</FORM>
</BODY>
</HTML>
I can't figure out what is going wrong. On the chance that it is the
navigator.js error mentioned by the reporter, I am cc'ing Heikki for
his expertise in that area - is this error bogus, or real?
But I also wonder if it is perhaps a Security issue involving cross-domain
frame access? I'm thinking in particular of lines like this above:
parent.mainframe.location.replace('/requisite/home.htm');
which is invoked from inside Frame 1.
Changing component to Security-General for further triage - I do not see
any JS Engine issues here -
Assignee: rogerl → mstoltz
Status: UNCONFIRMED → NEW
Component: Javascript Engine → Security: General
Ever confirmed: true
OS: Windows NT → All
QA Contact: pschwartau → ckritzer
Comment 2•24 years ago
|
||
I can't seem to reproduce this, looks like the site is broken. When I click
Login, I see
Error: Version mismatch:The software version does not match the database
version, please contact your administrator to ensure
the system has been upgraded properly. Software version=BugsEye 3.0.0.8, db
version=3.0.0.5 (2000-11-02 15:11:22.0)
This error shows up regardless of the browser I use. Robert, can you give me
another testcase?
Status: NEW → ASSIGNED
Reporter | ||
Comment 3•24 years ago
|
||
Robert: I have updated the test site... the link should work fine now:
http://pasteur.requisite.com/requisite/login.htm
After you login to http://pasteur.requisite.com/servlet/BugsEye, note that the
tabs at the top do not work -- and the JavaScript error previously mentioned
occurs in Netscape 6:
Error: focusedWindow.location has no properties
Source File: chrome://navigator/content/navigator.js
Line: 118 Column: 0
Please call me if you have ANY problems with the example site or if you need any
additional information. Work: 303.474.2265 (Requisite Technology)
Thanks Guys!
- Robert =)
Comment 4•24 years ago
|
||
I had a simillar problem with posting two form into two frames. I've created a
testcase on http://www.mindent.com/test
The basic setup is 3 frames: "menu", "header", "main"
The button in menu sends forms into other two frames. They return "recieved
Post!" when they recieve post :-) else they show their names.
There is also a Debug check box. When checked after posting each forn, you're
get alertbox conforming it. I found that when it's on AND you wait after first
alert until the main frame is updated, click OK, the the second form is posted,
web application recieves both forms. Otherwise the first form posting is
interupted by the second posting and only the second one recieves the post!
Pali
Comment 5•24 years ago
|
||
please add "testcase" Keyword, so that something finally happens with this
bug...
Comment 6•24 years ago
|
||
But we don't _have_ a testcase. A testcase is a small (~1k) document or set of
documents that reproduces the bug. All we have are some big files and some CGI
scripts... I am confoosed...
Comment 7•24 years ago
|
||
We HAVE a testcase!! I created it here:
http://www.mindent.com/test
Haven't you read my previous comment from 2000-12-16 02:06 ?!
Pavol Vaskovic
Comment 8•24 years ago
|
||
Pavol: yep, sorry. I was looking for something even simpler but that will do!
Thanks! :-)
So it seems that the first submission is being killed by the second submission.
Triaging -> form submission component.
Assignee: mstoltz → rods
Severity: critical → major
Status: ASSIGNED → NEW
Component: Security: General → Form Submission
QA Contact: ckritzer → vladimire
Summary: Links don't work → when submitting two forms from JS only one succeeds
Comment 10•24 years ago
|
||
Bug still present in Mozilla 0.7 build 20010109. In testcase only last form has
successfull submision. Hope something happens with this until 0.9 because it's
IMHO a real showstopper in web aplications (there is subsequent posting of two
or more forms really common).
Comment 11•24 years ago
|
||
I can reproduce this. Note that in order to reproduce the problem, I had to
turn off insecure form submit warning (uncheck the "show this warning next time"
checkbox in the dialog that pops up whenever you submit any form). I think this
allows the form submissions to occur rapidly enough after one another to reveal
a race condition.
My guess is that this bug is a permutation of the loading/targetting problem.
That is, when the form is submitted, the *load* is occuring in the *initiating
frame*, not the *targetted frame*. Then, when the second *load* occurs, it too
occurs in the *initiating frame*, and cancels all previous loads in this frame
(i.e. cancels the earlier load, which was not targetted at the same window).
Handing this one over to Rick who, I think, is looking at these issues. (If
not, please feel free to hand it back!)
Assignee: pollmann → rpotts
Comment 12•24 years ago
|
||
isn't this a dupe of bug 48759 : Flash plug-in not able to get multiple page??
if yes, then this deserves also P2 :-)
Comment 13•24 years ago
|
||
Hey! Let's join forces with ppl around bug 48759 so it gets finally solved!
C'mon, read that bug and tell me if I'm wrong when I think it is the same bug
as this one. Or reather tell me that I'm right :-) but do something. This is
too important to miss the mozilla0.9! So let's get things moving! :-)
Comment 14•24 years ago
|
||
I'm using Netscape 6.01 right now and getting the same error (only mine reports
on line 118). I'm getting this error in frames even when not using forms.
Anytime that a link loads another page in the same frame I get the error. I've
made a bare minimum test case at
http://suroot.net/u/news/everpresent/MozillaTest/index.htm
The testcase shows that:
when you load the same page into the same frame, you get the error
when you load a different page into the same frame, you get the error
when you load a page into a different frame, you don't get the error
I know you're looking for something to do with form submitions but I believe
this is the same bug. Since I have a different line number being reported I got
a copy of my navigator.js file (save as) and checked that the error is coming
from the function contentAreaFrameFocus. You can check this against your
navigator.js to make sure these are the same bugs. Also if you want a copy of
my navigator.js file: http://suroot.net/u/news/everpresent/MozillaTest/navigator.js
It looks like all this code does is keep track of which "frame" has focus and
what that frame's URL is so that the browser knows what URL to save when the
user clicks "Save Frame As". Maybe just adding a "&& window.location" to the if
statement to make sure there is a location object would fix this bug. It might
introduce the possibility that netscape won't know what URL to save if the user
clicks "Save Frame As" before giving another frame focus but at least this would
get rid of all the nasty JS errors. Maybe I'm way off here, check out the
testcase and let me know.
Comment 15•24 years ago
|
||
Is this related to bug 68666?
Comment 16•24 years ago
|
||
I don't think so. This one doesn't need to be submitted via javascript (or even
use a form submitted in any way).
Comment 17•24 years ago
|
||
If JS is not necessary then I suggest you redo the test case to save yourself
the pain of running into the other bug!
Comment 18•24 years ago
|
||
Tim: the error shown on JavaScript console does not affect this bug. I don't
think this has something to do with the bug you mention, but I will take further
investigation on that...
Comment 19•24 years ago
|
||
Adam: No this is not related to 68666.
All: I've made testcase which respods with the method by which the variables
came: http://www.mindent.com/test/get.html and
http://www.mindent.com/test/post.html
This bug ocurrs regardless of the submit method (both GET and POST) so the
problem is somewhere in the Form Submition part.
Comment 20•24 years ago
|
||
Also mozilla 0.8 introduced some redraw bug -> see testcase
Assignee | ||
Updated•24 years ago
|
Target Milestone: --- → mozilla0.9.1
Updated•24 years ago
|
Target Milestone: mozilla0.9.1 → mozilla0.9.2
Comment 21•23 years ago
|
||
Is there already a solution/work around for this problem?
Assignee | ||
Comment 22•23 years ago
|
||
This should be fixed with the patch in bug #65777.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 23•23 years ago
|
||
Rick: sorry but this isn't solved by that patch :-( if it(the patch) was checked
in and turned on in windows build 2001051604. See testcase...
--mondo
Comment 24•23 years ago
|
||
SORRY!!!
I don't know why but when I tryed for second time it worked correctly, so I take
my last post back. Again I'm sorry for the spam.
--mondo
Comment 25•23 years ago
|
||
verifying fixed on build 2001-05-15-04-trunk windows 98
Status: RESOLVED → VERIFIED
Updated•6 years ago
|
Component: HTML: Form Submission → DOM: Core & HTML
You need to log in
before you can comment on or make changes to this bug.
Description
•