almystersv Posted January 16, 2008 Share Posted January 16, 2008 Hi Guys, I have a link to a page that has minimal information on it and I would like for it to open in a new window that I can set to a certain size (i.e. smaller than full page) Is this going to be easy? Thanks Link to comment https://forums.phpfreaks.com/topic/86321-solved-linking-to-a-page-that-opens-in-a-new-smaller-window/ Share on other sites More sharing options...
tapos Posted January 16, 2008 Share Posted January 16, 2008 Use javascript function window.open to popup a small window. -- Thanks, Tapos Pal http://tapos.wordpress.com Link to comment https://forums.phpfreaks.com/topic/86321-solved-linking-to-a-page-that-opens-in-a-new-smaller-window/#findComment-441052 Share on other sites More sharing options...
almystersv Posted January 16, 2008 Author Share Posted January 16, 2008 Sorry im new to java script Do i put that at the top of the page i am linking to or within the link or...?! Thanks Link to comment https://forums.phpfreaks.com/topic/86321-solved-linking-to-a-page-that-opens-in-a-new-smaller-window/#findComment-441062 Share on other sites More sharing options...
almystersv Posted January 16, 2008 Author Share Posted January 16, 2008 I should probably add that i am building the system in php but my message was sent here by someone in the php forum. thanks Link to comment https://forums.phpfreaks.com/topic/86321-solved-linking-to-a-page-that-opens-in-a-new-smaller-window/#findComment-441065 Share on other sites More sharing options...
trq Posted January 16, 2008 Share Posted January 16, 2008 PHP outputs strings, be that html, javascript, css or whatever. You need use Javascript window.open() function to open a new window. PHP doesn't even know what a browser is let alone a window. Thats why I moved your thread. You can call javascripts window.open() function from an OnClick event to make it work when a link is clicked. eg; <a href="#" OnClick='window.open("http://domain.com/page.php", "windowname","location=1,status=1,scrollbars=1, width=60,height=40");'>Click</a> Link to comment https://forums.phpfreaks.com/topic/86321-solved-linking-to-a-page-that-opens-in-a-new-smaller-window/#findComment-441082 Share on other sites More sharing options...
taith Posted January 16, 2008 Share Posted January 16, 2008 other way would be to target="_new" and then resize() it on the popup... useful in some cases... not all :-) Link to comment https://forums.phpfreaks.com/topic/86321-solved-linking-to-a-page-that-opens-in-a-new-smaller-window/#findComment-441127 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.