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

12-22-2010, 11:15 AM
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, 11:57 AM
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

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.

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


EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum