Jump to content

Page not displaying correctly


rthomson

Recommended Posts

I am having a slight problem with my dynamic form working in Internet Explorer 8.  It functions properly in all browsers on Mac and Windows machines.  I have a reservations form and when you choose a month in a drop down list, it dynamically creates another drop down with a list of reservation dates for that month.  Well, in Internet Explorer it allows me to choose the month, but the second drop down never appears.  All other browsers work fine.  Anyone have any ideas??

 

Here is the pertinent code for index.php page...

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js"></script>

<script type="text/javascript">
$(document).ready(function() {
$('#wait_1').hide();
$('#drop_1').change(function(){
  $('#wait_1').show();
  $('#result_1').hide();
      $.get("func.php", {
	func: "drop_1",
	drop_var: $('#drop_1').val()
      }, function(response){
        $('#result_1').fadeOut();
        setTimeout("finishAjax('result_1', '"+escape(response)+"')", 400);
      });
    	return false;
});
});

function finishAjax(id, response) {
  $('#wait_1').hide();
  $('#'+id).html(unescape(response));
  $('#'+id).fadeIn();
}
</script>
<p align="left"> </p>
      <p align="left" class="home">Booking Form</p>
      <p align="left"><font size="2" face="Arial" color="#006600">Reservation Month:</font>
      
     <form action="resersend.php" method="post">
  
    <select name="drop_1" id="drop_1">
    
      <option value="" selected="selected" disabled="disabled">Choose One</option>
      
      <?php getTierOne(); ?>
    
    </select> 
    
    <span id="wait_1" style="display: none;">
    <img alt="Please Wait" src="ajax-loader.gif"/>
    </span>
    <span id="result_1" style="display: none;"></span> 
  
      <br>

<?php if(isset($_POST['submit'])){
$drop = $_POST['drop_1'];
$tier_two = $_POST['tier_two'];
echo "You selected ";
echo $drop." & ".$tier_two;
}
?></form>

 

And here is the func.php page that works with index...

<?php
//**************************************
//     Page load dropdown results     //
//**************************************
function getTierOne()
{
$result = mysql_query("SELECT DISTINCT MONTH FROM daterange") 
or die(mysql_error());

  while($tier = mysql_fetch_array( $result )) 
  
	{
	   echo '<option value="'.$tier['MONTH'].'">'.$tier['MONTH'].'</option>';
	}

}

//**************************************
//     First selection results     //
//**************************************
if($_GET['func'] == "drop_1" && isset($_GET['func'])) { 
   drop_1($_GET['drop_var']); 
}

function drop_1($drop_var)
{  
    include_once('db.php');
$result = mysql_query("SELECT * FROM daterange WHERE DEND > DATE(NOW()) AND STATUS='A' AND MONTH='$drop_var' ORDER BY DATE, SITE")
or die(mysql_error());

echo '<select name="RID">
      <option value=" " disabled="disabled" selected="selected">Choose a Reservation</option>';

	   while($drop_2 = mysql_fetch_array( $result )) 

		{
		 echo '<option value="'.$drop_2['RID'].'">'.$drop_2 ['DATE']. ', '.$drop_2 ['SITE']. ', '.$drop_2 ['PRICE'].'</option>';
		}

echo '</select> ';

echo "</p>";
echo "<p align=left>";

echo "<br>";

echo "</select><p align=left><label><font size=\"2\" face=\"Arial\">First Name: <input type=\"text\" name=\"FNAME\" size=\"50\" maxlength=\"50\" tabindex=\"1\"<br>";

echo "<p align=left><label>Last Name: <input type=\"text\" name=\"LNAME\" size=\"50\" maxlength=\"50\" tabindex=\"2\"<br>";

echo "<p align=left><label>Address Line 1: <input type=\"text\" name=\"ADDR1\" size=\"50\" maxlength=\"50\" tabindex=\"3\"<br>";

echo "<p align=left><label>Address Line 2: <input type=\"text\" name=\"ADDR2\" size=\"50\" maxlength=\"50\" tabindex=\"4\"<br>";

echo "<p align=left><label>City: <input type=\"text\" name=\"CITY\" size=\"50\" maxlength=\"50\" tabindex=\"5\"<br>";

echo "<p align=left><label>State (abbrev.): <input type=\"text\" name=\"STATE\" size=\"2\" maxlength=\"2\" tabindex=\"6\"<br>";

echo "<p align=left><label>Zip Code: <input type=\"text\" name=\"ZIP\" size=\"5\" maxlength=\"5\" tabindex=\"7\"<br>";

echo "<p align=left><label>Contact Phone Number: (<input type=\"text\" name=\"PHONE1\" size=\"3\" maxlength=\"3\" tabindex=\"8\"";
echo "<label>)<input type=\"text\" name=\"PHONE2\" size=\"3\" maxlength=\"3\" tabindex=\"9\"";
echo "<label>-<input type=\"text\" name=\"PHONE3\" size=\"4\" maxlength=\"4\" tabindex=\"10\"<br>";

echo "<p align=left><label>Email: <input type=\"text\" name=\"EMAIL\" size=\"50\" maxlength=\"50\" tabindex=\"11\"<br>";

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.