Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open Hyperlink in new window 2

Status
Not open for further replies.

Bill4tektips

Technical User
Aug 5, 2005
175
GB
Can anyone help please?
I have inherited some .js files and I need to add in a hyperlink to open in a new window. The reason for this is that the original page is in a frame set.
The coding I have at present is:

document.writeln(" The <A");
document.writeln(" HREF=\"/ups/uk/process/other_resources/r00237/r00237.htm\">Design Guide to Manufacturing Systems Design (R00237) ");
document.writeln(" </A>contains the accepted best estimates.<br><br>");

How can I get this to open in a new window. I have tried adding Target="_blank" but that doesn't work.
 
I have tried adding Target="_blank" but that doesn't work.

?? this works perfectly for me (although target is deprecated):

Code:
<script type="text/javascript">
document.writeln("  The <A target='_blank'");
document.writeln("  HREF=\"/ups/uk/process/other_resources/r00237/r00237.htm\">Design Guide to Manufacturing Systems Design (R00237) ");
document.writeln(" </A>contains the accepted best estimates.<br><br>");
</script>



*cLFlaVA
----------------------------
[tt]"quote goes here"[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Code:
document.writeln("  HREF=\"/ups/uk/process/other_resources/r00237/r00237.htm\" [!]target=\"_new\"[/!]>Design Guide to Manufacturing Systems Design (R00237) ");

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
 
kaht,

the keyword is "_blank", although I suppose "_new" would work just as well, so long as you don't already have a window opened named "_new", otherwise it would load in that window.



*cLFlaVA
----------------------------
[tt]"quote goes here"[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
yeah, _new is just an old habit.

I sometimes use this since it works as well:
Code:
<a href="[URL unfurl="true"]http://www.kinkyKellyAndTheSexyStud.html"[/URL] target="_f-yo-momma">Click Me Please</a>

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
 
headbang.gif




*cLFlaVA
----------------------------
[tt]"quote goes here"[/tt]
[URL unfurl="true"]http://www.coryarthus.com/[/url]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top