Closed Thread Icon

Topic awaiting preservation: About:blank in javascript (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=24768" title="Pages that link to Topic awaiting preservation: About:blank in javascript (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: About:blank in javascript <span class="small">(Page 1 of 1)</span>\

 
amikael
Bipolar (III) Inmate

From: övik
Insane since: Dec 2002

posted posted 01-22-2005 23:09

Hi, I was wondering if anyone know if there's a javascript version of target="_blank"?
Since popups are evil, and some redirections needs to be done using javascript, and sometime while keeping the current page, it could come in handy.
- If this is a stupid question, I appologize, but I googled around and could'nt find anything..

(^-^)b

poi
Paranoid (IV) Inmate

From: France
Insane since: Jun 2002

posted posted 01-23-2005 15:53

I don't understand what you want. Do you want to open a popup/emulate the target attribute where its not allowed by the DOCTYPE or not ? If you do, then you could use the rel attribute of the A tags to denote if they are external, then onload of the page, detect these A tags and onclick trigger a window.open( this.href, "", "" ).

BillyRayPreachersSon
Bipolar (III) Inmate

From: London
Insane since: Jul 2004

posted posted 01-25-2005 00:49

This always works for me, and gets around the validation problems where the DOCTYPE will not allow a "target=":

<a href="somefile.html" onclick="this.target = '_blank';">link text</a>

Dan

« BackwardsOnwards »

Show Forum Drop Down Menu