emediastudios Posted November 22, 2007 Share Posted November 22, 2007 I have this code, i have tried for ages, I'm hopless, how can i ,make this link open in a new window? Thanks for any help. <?php<input type="button" class="fields" value="Printer Friendly" onclick="document.location.href='print_application.php?id= <?php echo $row_Recordset1['id']; ?> ';"> ?> Quote Link to comment https://forums.phpfreaks.com/topic/78368-solved-open-new-window/ Share on other sites More sharing options...
BenInBlack Posted November 22, 2007 Share Posted November 22, 2007 it is better to use the window.location <a href="javascript:void();" onclick="window.location = '/phpfile.php';" target="_blank"><img src="/images/gosomewhere_button.gif></a> Quote Link to comment https://forums.phpfreaks.com/topic/78368-solved-open-new-window/#findComment-396543 Share on other sites More sharing options...
rajivgonsalves Posted November 22, 2007 Share Posted November 22, 2007 try <input type="button" class="fields" value="Printer Friendly" onclick="window.open('print_application.php?id=<?php echo $row_Recordset1['id']; ?> ','','');"> Quote Link to comment https://forums.phpfreaks.com/topic/78368-solved-open-new-window/#findComment-396544 Share on other sites More sharing options...
emediastudios Posted November 22, 2007 Author Share Posted November 22, 2007 try <input type="button" class="fields" value="Printer Friendly" onclick="window.open('print_application.php?id=<?php echo $row_Recordset1['id']; ?> ','','');"> Worked a treat, thanks Quote Link to comment https://forums.phpfreaks.com/topic/78368-solved-open-new-window/#findComment-396553 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.