Click to See Complete Forum and Search --> : HTML Target = _...


minus18
08-01-2001, 10:08 AM
My questions are getting about easier language.

1) JavaScript
2) PHP

Now HTML :

Has anyone, ever, got the poxy special TARGET commands to work in HTML?

I reckon they are a myth, thought up by the W3C and dutifully put in books but never actually implemented in browsers.

Code snippet:
<frame src = "login.php" name=_BLANK>

Result: login.php loads into the frame from which it is called, not a new frame.

(Yeah I have all the appropriate "'s etc I have taken them out for clarity (How often have you seen that written?))

I am trying this in Netscape 4.77 and Opera 5 for Linux Suse7.1


:mad:

EyesWideOpen
08-01-2001, 10:22 AM
They do work.

I think what you need in your case is to specify a frame like you have with some name and source (which will be what is loaded when the framed page is first displayed):

<FRAME NAME="main" SRC="login.php">

and then in a link somewhere you will reference that frame name to get the page to load in that frame:

<A HREF="logout.php" TARGET="main">Logout</A>

If you want to use the reserved target names you would use the same link above as:

<A HREF="logout.php" TARGET="_blank">Logout</A>

and that will load into a new browser window.

Here is the W3C spec for reserved target names: http://www.w3.org/TR/REC-html40/types.html#h-6.16

minus18
08-01-2001, 10:22 AM
D'oh!

You have to use TARGET within an A HREF !!

This means I don't need a logout button, just a hyperlink.

Oh well, I'll leave this up here for a while as a lesson for others.

:rolleyes: