Jump to content

firefox/IE problem


adamhhh

Recommended Posts

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
Share on other sites

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
Share on other sites

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.