Open Bug 671219 Opened 10 years ago Updated 4 years ago

Submit innerframes doesnt work

Categories

(Core :: DOM: Navigation, defect)

All
Other
defect
Not set
major

Tracking

()

UNCONFIRMED

People

(Reporter: piyu.aryan, Unassigned)

Details

(Keywords: testcase)

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 6.1; rv:5.0) Gecko/20100101 Firefox/5.0
Build ID: 20110615151330

Steps to reproduce:

I have a JSP page where there are multiple frames.
Somewhat like Left Menu Pane, Title Pane and Working Pane.
Now, In Working Pane there is Tabbed View is displayed.
There are some Submit buttons like Save.

NOTE: Each tab has its own iframe which displays separate JSP contents


Actual results:

Now, When I modify any of the Tab's contents, Save button gets enabled.
When Save is clicked All the tab's are individualy submitted through my Code.

Once page is saved Outer most frame is reloaded.

Now, This works Fine on FF3.x version.
it doesnt work on FF4.
Because there is JAvascript code written to submit all tab's one by one and then reload the parent frame.

in FF4 the java script code runs so fast that before all inner frames gets submitted parent frame gets reloaded. & Hence my intended operation doesnt happen.

I have introduced some delay by doing sample AJAX Call.
Then it works fine. But this is not Solution for my problem. There would me many places where i'll have to do such things.
So need help for the same.
Sample Code for my Save Button

if (is_moz || is_ff || is_fb || is_chrome)
{
    var frameObj = window.document.getElementById(w_registeredSegmentIds[i]);
    var w_wasHidden = frameObj.style.display == 'none'

    frameObj.style.display = ''
    frameObj.focus();

    if(frameObj.contentDocument.forms[0] != null)
	frameObj.contentDocument.forms[0].submit();
		
    if(w_wasHidden)
        frameObj.style.display = 'none'

}else
{
	if(window.document.frames['eform_seg_'+w_registeredSegmentIds[i]].document.forms[0] != null)
			window.document.frames['eform_seg_'+w_registeredSegmentIds[i]].document.forms[0].submit();
}

...
// After some more code I reload my parent Form
<%if(condition){%>
    document.eForm.submit();
<% } %>
So as document.eForm is my parent <Form> and JAvscript code written in for loop executes so fast that submit written inside for loop doesnt get completed and my parent Form gets submitted.

Now if i put some delay or alerts after each submit inside for loop. Everything works fine.

So my query is submit requests inside for loop gets vanished or it desont get dispatched as my parent form gets submitted.
Version: 5 Branch → 4.0 Branch
Please i need some inputs...
I have created a proto.
I use Jboss server.
Please run myMain.jsp.
Cliik on Save, in D:/MyFile.txt loggers for all files should come.
check the working on FF3.x, FF4 & FF5.

Output :
FF3: 
--------------------------------------------------
Main : Thu Jul 21 11:07:27 IST 2011
1 : default Name
3 : default Mobile
2 : default Adress

FF4 and FF5
--------------------------------------------------
Main : Thu Jul 21 11:07:27 IST 2011

Loggers for inner frames doesn't come.
Severity: normal → critical
Atleast I Expected some inputs from Mozilla Team.
I'm stuck on this. I have to introduce unnecessary delay for such working.
I have uploaded proto check it.. It wont work...

And FF team has to look into this coz same thing is happening on FF4 as well as FF5.
WTF.

Does any one care about the Bugs reported.
I have explained complete scenario,
Have given a prototype as well.. Still the Bug is unConfirmed.

If bugs are to be overlooked then why the hell Bugzilla is kept open for all users.

n It doesn't work for FF6 as well..

This is very bad that a user has reported a bug in version 4 which is der on major release 5 and 6 as well...

Good going...
Sorry this report managed to slip through the cracks.  I'm going to put it in what I believe is the correct bucket and see where it goes.
Component: General → Document Navigation
Product: Firefox → Core
QA Contact: general → docshell
Summary: Submit innerframes doesnt work with Firefox 4 → Submit innerframes doesnt work
Version: 4.0 Branch → unspecified
It sounds like the page just has a race condition, based on the description.  What should prevent the outer page reloading before the async requests complete, exactly?
Piyush? 

(In reply to Boris Zbarsky [:bz] from comment #8)
> It sounds like the page just has a race condition, based on the description.
> What should prevent the outer page reloading before the async requests
> complete, exactly?
Severity: critical → major
Flags: needinfo?(piyu.aryan)
Flags: needinfo?(piyu.aryan)
Keywords: testcase
You need to log in before you can comment on or make changes to this bug.