PDA

View Full Version : HTML question


rogue
11-28-06, 11:32 PM
i have a collection of links on a page that i would like to open in a new window but i want it so that they all open in the same window, if you see what i mean? so if the surfer click on link one, it opens a new window and if they click on a second link that loads on the wondow thats already opened

is this possible via HTML?

thanks

dvtimes
11-28-06, 11:35 PM
Do you mean that when they click on the 2nd link that the new open window changes, rather than being a brand new window?

redwhiteandblue
11-28-06, 11:41 PM
You need Javascript to do that, but it can be done.

rogue
11-29-06, 12:20 AM
Do you mean that when they click on the 2nd link that the new open window changes, rather than being a brand new window?

yeah


You need Javascript to do that, but it can be done.

anyone know where i can fid a copy of this script?

REBEL
11-29-06, 12:22 AM
should work with target="new" first link will open in a new window.. others should open in the new window.

I'm not sure though as it's not something I've tried myself but I believe that's the way it's supposed to work in theory.

rogue
11-29-06, 01:08 AM
should work with target="new" first link will open in a new window.. others should open in the new window.

I'm not sure though as it's not something I've tried myself but I believe that's the way it's supposed to work in theory.

thanks REBEL, that works just how i want it to! :)

redwhiteandblue
11-29-06, 01:19 AM
should work with target="new" first link will open in a new window.. others should open in the new window.


Well yeah, obviously that's the easy way of doing it...

rogue
11-29-06, 01:47 AM
Well yeah, obviously that's the easy way of doing it...

pmslmao

daveydude
11-29-06, 10:19 AM
Well yeah, obviously that's the easy way of doing it...

LOL, is there a harder way?

WordsforHire
11-29-06, 01:02 PM
Theres always the hard way and I end up doing it when it comes to HTML through sheer idiocy....

Skymouse
11-29-06, 09:33 PM
Well yeah, obviously that's the easy way of doing it...

It's easy ... but deprecated.

nizla
11-29-06, 10:42 PM
It's easy ... but deprecated.

Isn't opening a page in a new window depreciated? Is there an un-depreciated way to do it?

rogue
11-30-06, 12:02 AM
It's easy ... but deprecated.

how do you mean?

nizla
11-30-06, 12:08 AM
certain attributes and tags can still be used but are not "proper HTML" anymore as the web gets more and more CSS focused and nearer towards XHTML..

"target", "border", "bgcolor" and "align" are all depreciated as far as i understand things

rogue
11-30-06, 12:46 AM
i see, thanks

Skymouse
11-30-06, 12:46 PM
Yes - target is discouraged in HTML 4.01 transitional, and not allowed in HTML 4.01 strict or XHTML. You'd need to use JavaScript instead.

(In XHTML, there is a way of making target compliant - see http://accessify.com/features/tutorials/new-windows/ - but it's probably overkill except in cases where you have to be 100% sure that everything goes in the intended window even when JavaScript is disabled.)

SM

REBEL
11-30-06, 04:39 PM
I love how they kill target and force js.. for those of us who surf with js disabled it means links don't work.

JS is just so overkill for a new window.. why use a script when there's a less complicated method. It was the most idiotic decision w3 made.

redwhiteandblue
11-30-06, 06:29 PM
Yes - target is discouraged in HTML 4.01 transitional, and not allowed in HTML 4.01 strict or XHTML.

Is it not? I always write in XHTML and target seems to work fine for me. I guess if I ran it through the W3C validator it would complain, but does anyone ever actually bother?