By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,036 Members | 978 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,036 IT Pros & Developers. It's quick & easy.

Can't send frame to a URL a second time IN IE5...

P: n/a
This fails only in IE 5. It works flawlessly in IE5.5+[s], Netscape[s], Opera[s] and Mozilla[s].

I'm using javascript to navigate in my content. I can load the starting page just fine (page0.html). Any subsequent use of the below
function does nothing.

I'm testing tURL, and it contains the correct URL (page1.html), and also testing that parent.frames.moduleFrame.location.href
returns the current page's URL, which it does.

Code:

function redrawPage(){
var tURL;
if(this.modType == "lesson")
tURL = "page" + this.currentPage + ".html";
else
tURL = "moduleDisplay.html";
parent.frames.moduleFrame.location.href = tURL;
}

These pages do employ document.write to write contents.

PLEASE help!
Jul 23 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
VK
> parent.frames.moduleFrame.location.href = tURL;

try instead:
window.top.moduleFrame.location.href=tURL
(more reliable)

Also "this" is a very fancy girl sometimes, acting rather like "that"
(meaning "hell knows what I'm pointing to"). Except referencing the parent
form from within a form element, I'd suggest always use the object name
itself (unless you are extending the "window" object and this function is a
method of your customary object, which I cannot tell from this snip).

After that it should work.
Jul 23 '05 #2

P: n/a
It is being used in a custom object, which is the "this", in this case. The object is used to maintain state on the client-side.

I can't go from window.top as this frameset could be nested 4-40 deep, and I will have no control over the number of levels... only
the direct relationship between the target frame and it's parent.

What could possibly cause a frame which is known to exist, and can be queried for name/id, to not allow location.href assignment
and also not throw an error?

BTW: thank you for your quick response to my original.

"VK" <sc**********@yahoo.com> wrote in message news:41***********************@news.freenet.de...
parent.frames.moduleFrame.location.href = tURL;


try instead:
window.top.moduleFrame.location.href=tURL
(more reliable)

Also "this" is a very fancy girl sometimes, acting rather like "that"
(meaning "hell knows what I'm pointing to"). Except referencing the parent
form from within a form element, I'd suggest always use the object name
itself (unless you are extending the "window" object and this function is a
method of your customary object, which I cannot tell from this snip).

After that it should work.

Jul 23 '05 #3

P: n/a
VK
> parent.frames.moduleFrame.location.href = tURL;

This statement is using the "Sloppy Joe's Syntacs" - maybe IE 5.0 is just
less tolerant as other browsers?

Try the conventional syntacs:
parent.frames('moduleFrame').location.href=tURL

Tell me if it helps.

Jul 23 '05 #4

P: n/a
On Wed, 29 Sep 2004 13:51:17 +0200, VK <sc**********@yahoo.com> wrote:

[snip]
Try the conventional syntacs:
parent.frames('moduleFrame').location.href=tURL


That isn't conventional. The frames collection is just that: a collection.
It is not a function[1]. Use square brackets:

frames['moduleFrame']

[snip]

Mike
[1] Some browsers might allow it, but it's probably just to be compatible
with IE. Square brackets should be supported by all browsers.

--
Michael Winter
Replace ".invalid" with ".uk" to reply by e-mail.
Jul 23 '05 #5

P: n/a
VK
My bad!
A Microsofted thinking eventually gets you: slow but sure :-)
Jul 23 '05 #6

P: n/a
Cleaned it up and it still didn't work.

Strange quirk: I notice that if I [SHIFT]+click on the link that calls the function, while it does open a page in a new window, the
ORIGINAL windows DOES advance to the correct URL.

WTH?!?!?
"VK" <sc**********@yahoo.com> wrote in message news:41***********************@news.freenet.de...
My bad!
A Microsofted thinking eventually gets you: slow but sure :-)

Jul 23 '05 #7

P: n/a
VK
Do you have a link to look at?

Also just for a hell of it check that all test browsers have equal security
settings.
Jul 23 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.