It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming JavaScript Forum

Open a New Window

Open a New Window

Postby hiyatran on Sun Aug 21, 2011 12:16 pm

when a user click on a link, it would open a new window in HTML it is something like this:
Code: Select all
<a href="http://google.com" target="_blank">click here</a>



How do I do this in Javascript? So a user would click on the link and it would open a new window. Here's my code
Code: Select all
document.writeln('<tr><td>' + "http://google.com" + '</td></tr>');


I know window.open(url) would open a new window, but how do I make it clickable??

Any comments or suggestion would be greatly appreciated.
thanks
hiyatran
 
Posts: 18
Joined: Mon Jun 21, 2010 1:53 am

Who is online

Users browsing this forum: No registered users and 8 guests