...

View Full Version : Resolved This "_target" is not working and I can't see why?



DanielHowden
12-22-2010, 12:15 PM
This code works well, the value of "Val" is a web address but I want it to open to a new window or tab.

Cheers Daniel.


document.getElementById('SelectedResult').innerHTML="<font size=2><a Href=" + Val + "target='_blank'>" + Val + "</a>"

Philip M
12-22-2010, 12:57 PM
You must include a space in front of target:-


document.getElementById('SelectedResult').innerHTML="<font size=2><a href=" + Val + " target='_blank'>" + Val + "</a>"

Otherwise the link is


http://www.google.comtarget=_blank
and not
http://www.google.com target=_blank




All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.

DanielHowden
12-22-2010, 03:29 PM
Thank you, that is very helpful.

Daniel.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum