Closed
Bug 68816
Opened 25 years ago
Closed 25 years ago
form posted to new window when domain truncated
Categories
(Core :: Layout: Form Controls, defect)
Tracking
()
People
(Reporter: asreddy_74, Assigned: rods)
Details
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; DigExt)
BuildID: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; m18) Gecko/20010131
When a form in a page has target an iframe and document domain is truncated
iframe lauched in new window when form is submited. Problem can be reproduced
on tomcat and iis webservers but not on apache where it works allright
Reproducible: Always
Steps to Reproduce:
create
file 1
<HTML>
<HEAD>
<SCRIPT>
var lsOrigin = document.domain;
var liFirstDot = lsOrigin.indexOf( "." );
document.domain = lsOrigin.substring( liFirstDot + 1 );
document.write( document.domain );
</SCRIPT>
</HEAD>
<BODY>
<FORM target="frm1" method="post" action="http://www.mozilla.org">
<input type="submit" value="submit">
</FORM>
<IFRAME name="frm1" width="100%" height="200"
src="http://myserver.com/myfile2.html"></IFRAME>
</P>
</BODY>
</HTML>
Change source of iframe (http://myserver.com/myfile2.html) to location of file2
on your server
file 2
<HTML>
<HEAD>
<script>
var lsOrigin = document.domain;
var liFirstDot = lsOrigin.indexOf( "." );
document.domain = lsOrigin.substring( liFirstDot + 1 );
</script>
</HEAD>
<BODY>
<SCRIPT>
document.write( document.domain + "<BR>" );
</SCRIPT>
</BODY>
</HTML>
Actual Results: In tomcat and iis webserver (on NT) form submitted in new
window and in apache form submitted to iframe in same window
Expected Results: form should be submitted in the same window
The idea is to look if page is scriptable and when not open a new window (after
origin check)
Comment 1•25 years ago
|
||
*** This bug has been marked as a duplicate of 68814 ***
Status: UNCONFIRMED → RESOLVED
Closed: 25 years ago
Resolution: --- → DUPLICATE
Updated•25 years ago
|
Status: RESOLVED → VERIFIED
Comment 2•25 years ago
|
||
verified
You need to log in
before you can comment on or make changes to this bug.
Description
•