adamhhh Posted March 20, 2007 Share Posted March 20, 2007 hi guys, the following script works perfectly in firefox, but not in IE, any ideas as im baffled? <?php $ticket_name = $_POST['ticket_name']; $m = $_REQUEST['m']; $threeLettercode = $_REQUEST['threeLetterCode']; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Changes and Refunds Calculator</title> <link href="style.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="leftdiv">Changes and Refunds <br /> <br /> <FORM NAME="frmMenu" action="changesandrefunds.php" method="post" onChange="submit()"> <?php $host = "localhost"; $user = "root"; $password = ""; $database = "rio_test"; $connection = mysql_connect($host,$user,$password) or die ("Couldn't connect to server."); $db = mysql_select_db($database, $connection) or die ("Couldn't select database."); echo "<SELECT NAME=\"m\">"; echo "<option>Ticket Name</option>"; $query = "SELECT * FROM new_calculator ORDER BY ticket_name"; $result = mysql_query($query) or die ("This entry hasn't been found."); while($row = mysql_fetch_array($result)) { $ticket_name = $row['ticket_name']; $field_name = $row['field_id']; $travel_plan_notes = $row['travel_plan_notes']; $refund_information = $row['refined_information']; echo "<OPTION VALUE=\"$field_name\">$ticket_name</OPTION>"; } //////// get the 3 lettered codes and return in a drop down box. echo "</select>"; echo "<br /><br />"; //echo "<input name=\"getbyname\" type=\"submit\" value=\"Submit\"/>"; echo "</form>"; echo "<FORM NAME=\"frmMenu2\" OnSubmit=\"navigate()\" action=\"changesandrefunds.php\" method=\"post\" onChange=\"submit()\">"; echo "<select name=\"threeLetterCode\" >"; echo "<option>Three letter code</option>"; $query2 = "SELECT * FROM new_calculator"; $result2 = mysql_query($query2) or die ("This entry hasn't been found."); while($row2 = mysql_fetch_array($result2)) { $code = $row2['code']; $new_field_id = $row2['field_id']; echo "<option>$code</option>"; } echo "</select>"; echo "<br />"; //echo "<input name=\"getbycode\" type=\"submit\" value=\"Submit\"/ onchange=\"submit()\">"; //echo $newvariable; echo "</form>"; ?> <p> Select Ticket Name <u>or</u> 3 Letter Code </p> </form> </div> <?php if (isset($_POST['m'])) { echo "<div id=\"rightdiv\">"; $query1000 = "SELECT * FROM new_calculator WHERE field_id = $m"; $result1000 = mysql_query($query1000) or die ("Please select an entry!"); $row1000 = mysql_fetch_assoc($result1000); $new_field_id = $row1000['field_id']; $new_ticket_name = $row1000['ticket_name']; $new_travel_plan_notes = $row1000['travel_plan_notes']; $new_refund_information = $row1000['refined_information']; $new_code = $row1000['code']; echo "<strong>Ticket Name:</strong> $new_ticket_name (<strong>code:</strong> $new_code)"; echo "<br /><br />"; echo "<strong>Change of travel plans</strong>"; echo "<br /><br />"; echo $new_travel_plan_notes; echo "<br /><br />"; echo "<strong>Refund Information</strong>"; echo "<br /><br />"; echo $new_refund_information; echo "</div>"; } if (isset($_POST['threeLetterCode'])) { echo "<div id=\"rightdiv\">"; $query1001 = "SELECT * FROM new_calculator WHERE code = '$threeLettercode'"; $result1001 = mysql_query($query1001) or die ("Please select an entry!!!!!"); $row1001 = mysql_fetch_assoc($result1001); $ticket_name = $row1001['ticket_name']; $new_refund_information2 = $row1001['refined_information']; $new_travel_plan_notes2 = $row1001['travel_plan_notes']; $new_code2 = $row1001['code']; echo "<strong>Ticket Name:</strong> $ticket_name (<strong>code:</strong> $new_code2)"; echo "<br /><br />"; echo "<strong>Change of travel plans</strong>"; echo "<br /><br />"; echo $new_travel_plan_notes2; echo "<br /><br />"; echo "<strong>Refund Information</strong>"; echo "<br /><br />"; echo $new_refund_information2; //////////// echo "</div>"; } ?> <p> </p> Link to comment https://forums.phpfreaks.com/topic/43454-firefoxie-problem/ Share on other sites More sharing options...
JasonLewis Posted March 20, 2007 Share Posted March 20, 2007 what dosnt work about it exactly? please post it in a bit more detail. thanks. Link to comment https://forums.phpfreaks.com/topic/43454-firefoxie-problem/#findComment-211035 Share on other sites More sharing options...
adamhhh Posted March 20, 2007 Author Share Posted March 20, 2007 not sure exactly, something to do with my submit() i think Link to comment https://forums.phpfreaks.com/topic/43454-firefoxie-problem/#findComment-211047 Share on other sites More sharing options...
JasonLewis Posted March 20, 2007 Share Posted March 20, 2007 this line here? echo "<input name=\"getbycode\" type=\"submit\" value=\"Submit\"/ onchange=\"submit()\">"; why not make it look like this? echo "<input name='getbycode' type='submit' value='Submit' onchange='submit()'>"; and submit(). is that a javascript function or what? i am not quite following your code... Link to comment https://forums.phpfreaks.com/topic/43454-firefoxie-problem/#findComment-211051 Share on other sites More sharing options...
adamhhh Posted March 20, 2007 Author Share Posted March 20, 2007 yep thats a bit of javascript and ive tried it in script tags etc. Link to comment https://forums.phpfreaks.com/topic/43454-firefoxie-problem/#findComment-211058 Share on other sites More sharing options...
flappy_warbucks Posted March 20, 2007 Share Posted March 20, 2007 this line here? echo "<input name=\"getbycode\" type=\"submit\" value=\"Submit\"/ onchange=\"submit()\">"; why not make it look like this? echo "<input name='getbycode' type='submit' value='Submit' onchange='submit()'>"; and submit(). is that a javascript function or what? i am not quite following your code... yup thats a bit of javascript alright change the attribute "onchange" to "onclick" i *think* that is where you are going wrong Link to comment https://forums.phpfreaks.com/topic/43454-firefoxie-problem/#findComment-211059 Share on other sites More sharing options...
adamhhh Posted March 20, 2007 Author Share Posted March 20, 2007 onclick doesnt work either Link to comment https://forums.phpfreaks.com/topic/43454-firefoxie-problem/#findComment-211066 Share on other sites More sharing options...
JasonLewis Posted March 22, 2007 Share Posted March 22, 2007 is the submit() a javascript function you've written yourself or are you trying to submit the form. if your trying to submit the form you dont need the submit() there. Link to comment https://forums.phpfreaks.com/topic/43454-firefoxie-problem/#findComment-212593 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.