hvle Posted August 14, 2006 Share Posted August 14, 2006 hi guys,I have a button like this:<input type="button" value="view post" onClick="document.location.href='http://google.com';">when click on this button, it will surf to google.comhowever, I also want it to open google in a new window.thanks Quote Link to comment https://forums.phpfreaks.com/topic/17479-button-click-and-open-link-in-new-window/ Share on other sites More sharing options...
ToonMariner Posted August 16, 2006 Share Posted August 16, 2006 Tell Miek to pay me and I'll help you ;) Christ its only $100 Quote Link to comment https://forums.phpfreaks.com/topic/17479-button-click-and-open-link-in-new-window/#findComment-75958 Share on other sites More sharing options...
Ifa Posted August 18, 2006 Share Posted August 18, 2006 target="_blank" Quote Link to comment https://forums.phpfreaks.com/topic/17479-button-click-and-open-link-in-new-window/#findComment-76694 Share on other sites More sharing options...
ToonMariner Posted August 18, 2006 Share Posted August 18, 2006 just use an anchor...<a href="http://google.com" target="_blank">view foobar</a> Quote Link to comment https://forums.phpfreaks.com/topic/17479-button-click-and-open-link-in-new-window/#findComment-76959 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.