sandbudd Posted July 23, 2010 Share Posted July 23, 2010 this echo statement works and opens a new browser window with correct url but I can't get the window to resize? Thanks in advance everyone. <?php if(empty($row_Recordset1['vb'])){ //empty() returned true : so there is nothing echo 'VB'; }else{ //empty() returned false so it is NOT true that there is nothing //so we can print it out: echo '<a href="javascript://" onClick="popupfunction(\'/highschool/volleyball/' . $row_Recordset1['vb'] . '\');" class="style3">VB</a>'; } ?> Here is the javascript <script type="text/javascript"> // <![CDATA[ function popupfunction(url) { window.open(url, 400, 500); return false; } // ]]> </script> Link to comment https://forums.phpfreaks.com/topic/208720-popup-works-but-wont/ Share on other sites More sharing options...
gizmola Posted July 23, 2010 Share Posted July 23, 2010 Why don't you read up on the javascript window.open() function? I think you'll notice that you need a string parameter with something like "width=400, height=500" in it. Link to comment https://forums.phpfreaks.com/topic/208720-popup-works-but-wont/#findComment-1090425 Share on other sites More sharing options...
sandbudd Posted July 23, 2010 Author Share Posted July 23, 2010 your right this is what worked... <script type="text/javascript"> // <![CDATA[ function popupfunction(url) { window.open (url,"mywindow","menubar=1,resizable=1,width=350,height=250"); return false; } // ]]> </script> Link to comment https://forums.phpfreaks.com/topic/208720-popup-works-but-wont/#findComment-1090428 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.