dadamssg Posted July 8, 2009 Share Posted July 8, 2009 i'm trying to make a div a link and then make it open it up in a new tab. heres what i have and its clickable but it doesn't do anything. <div id="twitter" onclick="window.open("http://www.twitter.com/test")></div> can anybody help? Quote Link to comment Share on other sites More sharing options...
corbin Posted July 8, 2009 Share Posted July 8, 2009 <div id="twitter" onclick="window.open("http://www.twitter.com/test")></div> Should be <div id="twitter" onclick="window.open('http://www.twitter.com/test')"></div> You were missing a closing quote on the onclick attribute, and you can't use double quotes inside of double quotes. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.