I have following scenario in my web application.
I want to load different web forms in single iframe. Iframe in contained in an ASP page. ASP page has “Submit” button, which submits iframe form, & then load new form in same frame.
This is more like slide show of child forms. ASP button also has “Back” button which loads previously submitted form in same iframe. On click of “submit” button, it resubmits child form.
This works fine in IE 6. But in firefox “re-submission” of form does not take place. So that in firefox, child form gets submitted only once.
Sample code
Expand|Select|Wrap|Line Numbers
- function setURL(form_url)
- {
- var iframe = “<iframe id= iframe name= “ + form_label + “ src= ” + form_url;
- document.getElementById(“div_name”).innerHTML = iframe;
- }
- function submitForm()
- {
- var frameObj = window.frames.form_label;
- if(frameObj.document.childForm)
- {
- frameObj.document.childForm.submit();
- setURL(nextForm_url);
- }
- }
above if condition fails in firefox when same child form(i.e with form_label value) is reloaded in iframe. Same code works fine in IE.
Thanks in advanced.