[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Re: KJS inability to correctly resolve relative URLs in frames [Bug#
From: Harri Porten <harri () trolltech ! com>
Date: 2001-03-11 17:49:34
[Download RAW message or body]
Dawit Alemayehu wrote:
>
> KJS is interpreting the URL assigned using the frame it is supposed to open
> the URL in :( For example if the links are in a frame labeled "nav" and the
> links on the document in that frame is as follows:
I thought this was the way to go so the implementation follows it ;)
> <a href="javascript: top.content.location='docs/content1.html">click here</a>
>
> AFAICT any references like the one above then ends up being resolved based on
> the base URL in the target frame, "content" in this case, instead of the
> originating frame, "nav"! The problem only shows up on the second click,
> regardless of the link you click on, if the the baseURL for the frames is the
> same and immediately if the baseURL of the target and originating frame are
> different...
>
> The solution is obviously to always resolve based on the current frame, but
> it would take me a while to figure the code and fix this correctly, while it
> would much less painful for the people that wrote the code (hint, hint).
Will do so tommorrow.
> BTW, both Simon and I agree that KJS should be resolving URLs using
> completeURL(...) for "href" entries instead of calling the relative KURL ctor
> for the sake of acting exactly like non-js links and allowing things to be
> solved in one place when and if problems occur.
Ok. The relative constructor I had already pinpointed to be wrong..
Didn't know about completeURL().
Thanks for looking into this,
Harri.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic