tmharrison Posted February 7, 2007 Share Posted February 7, 2007 I have downloaded the following script from http://www.php-development.ru/javascripts/popup.php It is a wonderful free popup window really great! I would like to some how incorporate it into my php script at the end were i have a couple of echo javascript statements right now. I there are quite a few options that you can decide on, and only one of them is what i wanted and it is at the 'mouse-corner' anyway below is the code from the there sample html page <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <link rel="stylesheet" type="text/css" href="sample.css" /> <script type="text/javascript" src="popup.js"> </script> </head> <body> <h3>DHTML Popup Window</h3> <form> <input type="button" value="Corner" onclick="popup_show('popup', 'popup_drag', 'popup_exit', 'screen-corner', 10, 10);" /> <input type="button" value="Center" onclick="popup_show('popup', 'popup_drag', 'popup_exit', 'screen-center', 10, 10);" /> <input type="button" value="Mouse" onclick="popup_show('popup', 'popup_drag', 'popup_exit', 'mouse-corner', -10, -10);" /> <input type="button" value="Right" id="pos_right" onclick="popup_show('popup', 'popup_drag', 'popup_exit', 'element-right' , 10, 0, 'pos_right');" /> <input type="button" value="Bottom" id="pos_bottom" onclick="popup_show('popup', 'popup_drag', 'popup_exit', 'element-bottom', 0, 10, 'pos_bottom');" /> <input type="button" value="Default" onclick="popup_show('popup', 'popup_drag', 'popup_exit');" /> </form> <br /> <br /> <div style="font-stile: Arial, Sans-Serif; font-size: 75%;"> <a href="http://www.hotscripts.com/Detailed/62154.html">Vote</a> for the script. <br /> Web scripts <a href="http://www.php-development.ru/products/collection/">collection</a>. </div> <div class="sample_popup" id="popup" style="visibility: hidden; display: none;"> <div class="menu_form_header" id="popup_drag"> <img class="menu_form_exit" id="popup_exit" src="form_exit.png" /> Login </div> <div class="menu_form_body"> <form method="post" action="popup.php"> <table> <tr> <th>Username:</th> <td><input class="field" type="text" onfocus="select();" /></td> </tr> <tr> <th>Password:</th> <td><input class="field" type="password" onfocus="select();" /></td> </tr> <tr> <th> </th> <td><input class="btn" type="submit" value="Submit" /></td> </tr> </table> </form> </div> </div> </div> </body> </html> anyway then here is my existing php code, you will see at the bottom there are two echo statements i would like to use this other javascript if i can figure out how to script just what i was needing and be able to put it in. <?php ob_start(); if (!empty($_POST['id_num'])) { require_once ('/home/virttcom/public_html/VHDdb/mysql_connect.php'); // Clean the $_POST['id_num'] to avoid sql injection if(get_magic_quotes_gpc()) { $_POST['id_num'] = stripslashes($_POST['id_num']); } $_POST['id_num'] = mysql_real_escape_string($_POST['id_num']); $q = "SELECT url FROM Tours WHERE id_num='{$_POST['id_num']}'"; $get_url = mysql_query($q) or die("There was a problem with the query: $q" . mysql_error()); if (mysql_num_rows($get_url) > 0) { $rw = mysql_fetch_assoc($get_url); $url = $rw['url']; // Redirect the user header("location:$url"); } else { echo "<script language=\"javascript\"> alert('Not Found - Contact to find out how to get setup'); </script>"; } } else { echo "<script language=\"javascript\"> alert('You didn\'t submit anything!'); </script>"; } ob_end_flush(); ?> Thanks for all your help! Tina Link to comment https://forums.phpfreaks.com/topic/37397-incorporating-dhtml-popup-window-into-my-php-script/ Share on other sites More sharing options...
fenway Posted February 7, 2007 Share Posted February 7, 2007 That's a lot of code... what specifically is the issue? Link to comment https://forums.phpfreaks.com/topic/37397-incorporating-dhtml-popup-window-into-my-php-script/#findComment-179196 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.