Forum Moderators: open

Message Too Old, No Replies

window.open('somefile.php'); need advice on this

alternatives

         

Matthew1980

8:04 pm on Jul 19, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi all,

This question has probably been asked lots of times, but, if a person has javascript turned off, is there another way to force a new window or tab if a user clicks on a link, rather than using target="_blank" as I want to maintain my xhtml validation, and the use of target="_blank" is now deprecated.

Thanks for any suggestions.

Cheers,
MRb

Demaestro

8:23 pm on Jul 19, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Matt,

Just use transitional. It being deprecated doesn't mean using it is bad. There really aren't many alternatives other than JS.

rocknbil

9:41 pm on Jul 19, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



target is coming back with HTML 5. :-)

Matthew1980

7:06 pm on Jul 20, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi all,

target is coming back with HTML 5. :-)

I have probably been told of this before, but, more than likely had forgotten about it.

>>It being deprecated doesn't mean using it is bad.

Granted, but you know what it's like when the only thing stopping complete validation is the use of target="_blank", so I escaped that by using window.open("someFile.php"); only to find that when testing with JS off it didn't do what I expected it to. Doh! It's Javascript!

But if what Rocknbil says is true, that its coming back in html5, I shall look forward to that :)

Cheers,
MRb

Demaestro

7:41 pm on Jul 20, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If validating is what your concern is swtich pages that use this to xhtml transitional. I am almost certain that it still validates that way.

rocknbil

7:43 pm on Jul 20, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Whadayamean "if?" :-P (kidding)

One ref [w3.org]

I get lost on the W3, probably not the most recent doc (2008 . . lol) but under 5.6,

The target attribute can now have the value _blank.


I rarely use XHTML anyway . . . most documents are not extending anything, it's HTML . . . I call it HTML. :-)