ozm8 Posted November 28, 2013 Share Posted November 28, 2013 Hello guys i need help I got a php script its an im messanger I have half set it up properly I think but im stuck on this step can someone please dumb it down for me 6) Set up linking page: On the page you want to link to PHP121 (e.g. your index.html page which will hav e a hyperlink to the PHP121 script, put this in the <HEAD> section: <script type="text/javascript"> var newwindow; function poptastic(url){ newwindow=window.open(url,'name','height=500,width=240,left=20,top=20,toolbar=no,m enubar=no,directories=no,location=no,scrollbar s=yes,status=no,resizable=yes,fullscreen= no'); if (window.focus) {newwindow.focus()} } </script> 7) Create link: Create the link to PHP 121 on your site. View php121index.php in a text editor to s ee an example of how to link to PHP121. Use code similar to the following to create a nice contact-list sized window: You need to edit the path to php121im.php if php121im.php is not in the same di rectory as your webpage that is linking to PHP121. <a href="javascript:poptastic('php 121im.php');">Instant Messenger</a> Link to comment https://forums.phpfreaks.com/topic/284353-i-need-help-im-a-retard/ Share on other sites More sharing options...
WebStyles Posted February 20, 2014 Share Posted February 20, 2014 There's nothing wrong with that. It should open a new window (unless you have javascript disabled or a popup blocker or something). What error are you getting? does it not open the window, or does it not display your file in the window? Link to comment https://forums.phpfreaks.com/topic/284353-i-need-help-im-a-retard/#findComment-1469680 Share on other sites More sharing options...
Check202 Posted May 12, 2014 Share Posted May 12, 2014 So it is like this: <html> <title>Title of your webpage</title> <head> <script type="text/javascript"> var newwindow; function poptastic(url){ newwindow=window.open(url,'name','height=500,width=240,left=20,top=20,toolbar=no,menubar=no,directories=no,location=no,scrollbar s=yes,status=no,resizable=yes,fullscreen=no'); if (window.focus) {newwindow.focus()} } </script> </head> <body> <h1>Click on funky link below and it will pop up in new window</h1> #Note below you have reference to php121 please ensure it is in the same folder as this script. <a href="javascript:poptastic('php121im.php');">Instant Messenger</a> </body> </html> That should work; However I think you are just copy and pasting some code from elsewhere. I suggest some more study. Link to comment https://forums.phpfreaks.com/topic/284353-i-need-help-im-a-retard/#findComment-1479155 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.