[Webkit-unassigned] [Bug 32860] New: Relative path in javascript is wrong while trying to open document in frames

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Dec 22 01:24:52 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=32860

           Summary: Relative path in javascript is wrong while trying to
                    open document in frames
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: All
        OS/Version: All
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: Frames
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: elvinas at liutkevicius.lt


Created an attachment (id=45374)
 --> (https://bugs.webkit.org/attachment.cgi?id=45374)
Example

Summary: 
Relative path in javascript is wrong while trying to open document in frames.


Steps to Reproduce:
We need three files in root directory: index.html, form1.html and form2.html
Also one file in /dir/ directory: action.html


index.html has one frame:
<iframe id="topframe" name="topframe" scrolling="no" frameborder="0"
width="980" height="580" src="form1.html";></iframe>


form1.html looks like this:
<input type="button" id="action" name="action" value="Make action" onclick =
"document.getElementById('actionframe').src='dir/action.html';">
<input type="button" id="sel" name="sell" value="..." onclick =
"top.frames['topframe'].location.replace('form2.html');">



action.html source is:
<script
type="text/javascript">parent.document.getElementById('sel').click();</script>


So, when you open index.html, you see two buttons: first (Action) that opens
form2.html in the same frame, second (...) that opens /dir/action.html in other
frame. While /dir/action.html just "clicks" the first button.

Basically both buttons do the same.

The problem is that (...) button does not work.


Expected Results:
parent.document.getElementById('sel').click() must just "click" the first
button and form2.html must be opened.

Actual Results:
parent.document.getElementById('sel').click() "clicks" the first button. But it
also changes relative path from /safari_test/form2.html to
/safari_test/dir/form2.html and servers gives an error:
Not Found
The requested URL /safari_test/dir/form2.html was not found on this server.

Regression:
On Safari 3 it was OK (I don't know which Webkit build it was though).

Notes:
I made an example, so you can test it here:
http://82.135.245.49/safari_test/

I attached sample code too.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list