PDA

View Full Version : Adding Target to Meta Refresh


patrik
09-12-2002, 09:08 PM
Is it possible to add a target to the Meta command below? The syntax eludes me...

<meta http-equiv="refresh" content="0;URL=Alt/index.html">

Javascript is not an option in this circumstance.

...feeling like I'm missing the forest for the trees today...
TIA!

umm
09-13-2002, 08:53 PM
Unfortunately, i don't think the target attribute can be used with the meta refresh.

adios
09-14-2002, 02:16 AM
By "Javascript is not an option" do you mean 'no way', 'nohow', 'nat ganna' dah it!'....otherwise:

<meta http-equiv="refresh" content="0;URL=javascript:open('Alt/index.html')">

winactive
06-05-2005, 11:41 AM
I have searched for a similar answer, it seems this question has not been asked for nearly 3 years. :)

My question is this, I was looking to force a page to load out of the target frame as I am using a Flash menu which only allows one target for all of it's links. 4 of my 7 links load into my 'main' frame in the frameset (works nicely) and 1 is a 'mailto' (making the target irrelevant), but 2 links need to load into the _top frame, so I thought maybe a re-directing page with META-REFRESH would work.

Reading this post seems it won't, so......

Is there a script to force a page to load into the _top frame if it detects it is loaded into a frame? (Thought occurs......I could change the Flash menu's links not to load into a frame and use a script to view the 4 linked frames in their parent frameset? :confused: ) (No I couldn't, it loads into the navbar frame)

Think this may be untidy and the other way hasn't been done? Yet....... :)

enumerator
06-05-2005, 12:21 PM
By the way, meta refresh can be disabled, so including an alternative link in the document is recommended.

winactive
06-05-2005, 01:56 PM
By the way, meta refresh can be disabled, so including an alternative link in the document is recommended.

That, I can manage. :thumbsup: Isn't it strange how I can't do the same from a meta tag or using javascript?

(If it helps, the 'external' site I'm linking to resides on the same server space, just in a different folder, one in the same tier, the other in the parent directory.)

I would have included the 'click here if you are not re-directed' type of link.

enumerator
06-05-2005, 02:11 PM
Well, it's probably possible, but scripting depends on specifics, and you haven't posted any code (and this is the wrong forum). ;)

winactive
06-05-2005, 02:26 PM
I don't have any code, I'm trying to write it! :D

How do I make a page loading in the 'main' frame (or any other frame, name is irrelevant) force to load in the _top frame automatically, without using a HTML link;

(i.e. <a href=blah.htm target=_top>Go to blah</a>)

This is why I had my hopes pinned on META-REFRESH as it supports automatic linking, but without the target option, I'm sunk. :(

Maybe a moderator would care to move my thread to Javascript, but I tried searching for an answer and couldn't find one.

winactive
06-05-2005, 03:20 PM
Anyone in the same pickle as me can use the usual meta-refresh tag but make sure the target page includes the following script to force it into the _top frame;

<SCRIPT LANGUAGE="javascript">
<!--
if (top.location != location) top.location.href = location.href;
//---> </SCRIPT>

Of course, using a re-directing page first is useful as enumerator suggests and the link can include the usual HTML frame targeting syntax.

Thanks.