A2xA Posted February 6, 2008 Share Posted February 6, 2008 Okay, I have a script that makes a popup form a form. I want the popup fixed on a portion of a page. Say the middle of the page scrolled down. Automatically once the popup is opened. Here's the script I need to edit to say that: window.open(URL,'' + id + '','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=275,height=300') is it in location? Quote Link to comment https://forums.phpfreaks.com/topic/89656-solved-fixed-popup-on-halfway-through-page-already-have-script/ Share on other sites More sharing options...
phpQuestioner Posted February 6, 2008 Share Posted February 6, 2008 http://www.google.com/search?hl=en&q=Centered+Pop-Up&btnG=Google+Search Quote Link to comment https://forums.phpfreaks.com/topic/89656-solved-fixed-popup-on-halfway-through-page-already-have-script/#findComment-459424 Share on other sites More sharing options...
A2xA Posted February 8, 2008 Author Share Posted February 8, 2008 No, I don't need it centered I need it my custom scrolled down and heigth. Quote Link to comment https://forums.phpfreaks.com/topic/89656-solved-fixed-popup-on-halfway-through-page-already-have-script/#findComment-461447 Share on other sites More sharing options...
A2xA Posted February 8, 2008 Author Share Posted February 8, 2008 nevermind, that's what I need. Just I don't know what function I need to define for the custom window?: <html> <head> <script language="javascript"> // Author: Eric King Url: http://redrival.com/eak/index.shtml // This script is free to use as long as this info is left in // Courtesy of SimplytheBest.net - http://simplythebest.net/scripts/ var win = null; function WHAT FUNCTION HERE(mypage,myname,w,h,scroll){ LeftPosition = (screen.width) ? (screen.width-w)/2 : 0; TopPosition = (screen.height) ? (screen.height-h)/2 : 0; settings = 'height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars='+scroll+',resizable' win = window.open(mypage,myname,settings) } </script> <script language="javascript"> function popUp() { day = new Date(); id = day.getTime(); var textInput = document.getElementById("urlselection").value var URL = "http://wiicharged.com/index.php?action=pm;sa=send;" window.open(URL,'' + id + '','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=375,height=400') } </script> </head> <body> <div style="text-align: left;"><a href="http://wiicharged.com/index.php?action=hubs"><img style="border: 0px solid ; width: 656px; height: 125px;" alt="Wii forum friend codes" src="http://i27.tinypic.com/2n24pag.png"></a><br> <br><br> <h3>Challenge Another Member to an Online Match!<h3> <form onsubmit="popUp(); return false"> <input type=button value="Challenge!" onClick="popUp()" id="urlselection"> </form> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/89656-solved-fixed-popup-on-halfway-through-page-already-have-script/#findComment-461453 Share on other sites More sharing options...
phpQuestioner Posted February 8, 2008 Share Posted February 8, 2008 Just I don't know what function I need to define for the custom window? what do you mean? Quote Link to comment https://forums.phpfreaks.com/topic/89656-solved-fixed-popup-on-halfway-through-page-already-have-script/#findComment-461458 Share on other sites More sharing options...
A2xA Posted February 8, 2008 Author Share Posted February 8, 2008 Nevermind I got it. Thanks Quote Link to comment https://forums.phpfreaks.com/topic/89656-solved-fixed-popup-on-halfway-through-page-already-have-script/#findComment-461459 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.