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 Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment 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 Quote Link to comment 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> Quote Link to comment 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 :-) 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.