php dropdown working in IE but not in firefox

First time working with php and Mysql.  created database with 3 tables, created php page to pull a recordset that was populated from the dropdown box.  This works fine in ie but nothing happens in firefox.  
Below is the code. I am using Dreamweaver to create the php page.

<form name="LookUp" id="form1" method="post" action="">
      <label>
      <span class="style56">Lookup Funeral Information </span><span class="style57"><br />

      <select name="selLookup" id="selLookup" onchange="form1.submit()">
        <?php
do {  
?>
        <option value="<?php echo $row_Names['CompleteName']?>"><?php echo $row_Names['CompleteName']?></option>
        <?php
} while ($row_Names = mysql_fetch_assoc($Names));
  $rows = mysql_num_rows($Names);
  if($rows > 0) {
      mysql_data_seek($Names, 0);
        $row_Names = mysql_fetch_assoc($Names);
  }
?>
                  </select>
please help, very frustrated
virginiawAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
virginiawConnect With a Mentor Author Commented:
This is the code that finally got it to work in both ie and firefox.
 <select name="selLookup" id="selLookup" onchange="document.getElementById('form1').submit()">
it was provided on another forum.
0
 
Dave BaldwinFixer of ProblemsCommented:
Although it looked a little odd, your code seemed to run when I put in my own database info.  Here's the complete page I used.  Put in your own info and try it.
<?php 
// DB configuration
$dbsystem = "mysql";    // Your database system
$dbhost = "your server";    // Your database server
$dbuser = "Your username";      // Your db username
$dbpass = "Your password";      // Your db password
$dbname = "Your database";      // Your database name
$dbtable = "Your table";  //"websitelist";

//mysql_connect('localhost', 'mysql_user', 'mysql_password');
$dbh = mysql_pconnect($dbhost, $dbuser, $dbpass);
mysql_select_db($dbname);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
 "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<title>Untitled</title>
</head>
<body>
<form name="LookUp" id="form1" method="post" action="">
      <label>
      <span class="style56">Lookup Funeral Information </span><span class="style57"><br />

      <select name="selLookup" id="selLookup" onchange="form1.submit()">
        <?php
$Names = mysql_query("SELECT * FROM $dbtable");
if (!$Names) {
   echo 'Could not run query: ' . mysql_error();
   exit;
}
$row_Names['CompleteName'] = '';
do {  
?>
        <option value="<?php echo $row_Names['CompleteName']?>"><?php echo $row_Names['CompleteName']?></option>
        <?php
} while ($row_Names = mysql_fetch_assoc($Names));
  $rows = mysql_num_rows($Names);
  if($rows > 0) {
      mysql_data_seek($Names, 0);
        $row_Names = mysql_fetch_assoc($Names);
  }
?>
</select>
</form>								
</body>
</html>

Open in new window

0
 
virginiawAuthor Commented:
Perhaps I should have stated that the dropdown box worked but it did not pass the value to form1 to display the filtered datat.  Sorry for the comfusion on my question. see complete code below.  


<?php session_start(); ?>
<?php require_once('Connections/MySql.php'); ?>
 
<?php
$maxRows_FuneralListing = 1;
$pageNum_FuneralListing = 0;
if (isset($_GET['pageNum_FuneralListing'])) {
  $pageNum_FuneralListing = $_GET['pageNum_FuneralListing'];
}
$startRow_FuneralListing = $pageNum_FuneralListing * $maxRows_FuneralListing;

$varLookup_FuneralListing = "-1";
if (isset($_POST['selLookup'])) {
  $varLookup_FuneralListing = (get_magic_quotes_gpc()) ? $_POST['selLookup'] : addslashes($_POST['selLookup']);
}
mysql_select_db($database_MySql, $MySql);
$query_FuneralListing = sprintf("SELECT * FROM selCemSyn WHERE CompleteName LIKE '%s' ", $varLookup_FuneralListing);
$query_limit_FuneralListing = sprintf("%s LIMIT %d, %d", $query_FuneralListing, $startRow_FuneralListing, $maxRows_FuneralListing);
$FuneralListing = mysql_query($query_limit_FuneralListing, $MySql) or die(mysql_error());
$row_FuneralListing = mysql_fetch_assoc($FuneralListing);

if (isset($_GET['totalRows_FuneralListing'])) {
  $totalRows_FuneralListing = $_GET['totalRows_FuneralListing'];
} else {
  $all_FuneralListing = mysql_query($query_FuneralListing);
  $totalRows_FuneralListing = mysql_num_rows($all_FuneralListing);
}
$totalPages_FuneralListing = ceil($totalRows_FuneralListing/$maxRows_FuneralListing)-1;

mysql_select_db($database_MySql, $MySql);
$query_Names = "SELECT Funerals.CompleteName FROM Funerals ORDER BY Funerals.CompleteName";
$Names = mysql_query($query_Names, $MySql) or die(mysql_error());
$row_Names = mysql_fetch_assoc($Names);
$totalRows_Names = mysql_num_rows($Names);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Chesed v' Emet</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="style4.css" rel="stylesheet" type="text/css" />
<script language="JavaScript">
<!--
function mmLoadMenus() {
  if (window.mm_menu_1128223454_0) return;
  window.mm_menu_1128223454_0 = new Menu("root",93,18,"",12,"#000000","#FFFFFF","#CCCCCC","#000084","left","middle",3,0,1000,-5,7,true,true,true,0,true,true);
  mm_menu_1128223454_0.addMenuItem("Contact&nbsp;Us");
   mm_menu_1128223454_0.hideOnMouseOut=true;
   mm_menu_1128223454_0.bgColor='#555555';
   mm_menu_1128223454_0.menuBorder=1;
   mm_menu_1128223454_0.menuLiteBgColor='#FFFFFF';
   mm_menu_1128223454_0.menuBorderBgColor='#777777';

mm_menu_1128223454_0.writeMenus();
} // mmLoadMenus()
//-->
</script>
<script language="JavaScript" src="mm_menu.js"></script>
<style type="text/css">
<!--
.style2 {font-size: x-small}
.style9 {color: #000000}
body,td,th {
      font-size: 0.8em;
      color: #FFFFFF;
}
body {
      background-color: #FFFFFF;
}
.style19 {font-size: 12}
.style20 {color: #FFFFFF; font-weight: bold; font-size: 12; }
.style29 {color: #FFFFFF; font-size: 12; font-style: italic; }
.style33 {font-size: 12; color: #FFFFFF; }
.style34 {
      font-family: Verdana, Arial, Helvetica, sans-serif;
      font-size: 18px;
      color: #FFFFFF;
      font-weight: bold;
}
.style37 {color: #000000; font-size: 12px; }
.style51 {font-size: 10}
.style52 {color: #000000; font-weight: bold; font-size: 10; }
.style53 {color: #000000; font-size: 10; }
.style56 {color: #000000; font-weight: bold; font-size: 10px; }
.style59 {font-size: 12px}
-->
</style>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-20912487-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>
<body>
<script language="JavaScript1.2">mmLoadMenus();</script>
<div id="wrap">
  <div id="header"> </div>
  <div id="nav">
    <ul>
      <meta name="keywords" content="Jewish Funerals,Chicago Jewish Funerals,Death,Mourning,Grief,Burial Shroud,Jewish Cemetary,Psychotherapy,embalming,cremation
casket,interfaith.,pre-paid funeral,prepaid funeral,grave marker,death benefits,rudy lerner, interment,cemetery,Burial vault,funeral chapel,graveside service,Social Security benefits,V.A. Benefite,Veterans Benefits,Public Aid funerals,low cost funerals,sympathy flowers,sympathy gifts,Jewish funeral customs and traditions,Low cost funerals, low cost Jewish funerals" /><meta name="description" content="Chesed  v’Emet  provides funeral services and merchandise tailored to the need of you and your congregation.  Full service, discounted,  personalized funerals." />

<li><span class="style2"><a href="index.html">Home</a></span></li>
      <li class="style2"><a href="Services.htm">Professional <br>Services</a></li>
      <li class="style2"><a href="Funerals.htm">Funeral <br> Customs</a></li>
      <li class="style2"><a href="BurialMerchandise.htm">Burial <br>Merchandise</a></li>
      <li class="style2"><a href="GriefLoss.htm">Grief/Loss & <br>Psychotherapy</a></li>
  <li class="style2"><a href="PublicBenefits.htm">Public Resources</a></li><li class="style2"><a href="PrePaid.htm">Pre-Arrange<br> Funerals</a></li>
    </ul>
  </div>
  <div id="container">
    <div class="style2" id="rightcol">
      <div style="width : 189px;" #invalid_attr_id="1em">
        <ul style="padding : 0; list-style-type : none;" #invalid_attr_id="0">
            
             
              <table width="175" border="0">
  <tr valign="middle">
    <td width="98" valign="middle"><img src="images/phone.png" /> </td>
  </tr>
  <tr valign="middle">
    <td valign="middle"><a href="http://www.800florals.com/sympathy.asp?ID=FCVE" target="_blank" class="style9 style59">Send Flowers </a></td>
  </tr>
  <tr valign="middle">
    <td valign="middle"><a href="http://astore.amazon.com/chesedvemetco-20" target="_blank" class="style59">Recommended Readings</a></td>
  </tr>
  <tr valign="middle">
    <td valign="middle">&nbsp;</td>
  </tr>
  <tr valign="middle">
    <td valign="middle"><form name="LookUp" id="form1" method="post" action="">
      <label>
      <span class="style56">Lookup Funeral Information </span><span class="style57"><br />

      <select name="selLookup" id="selLookup" onchange="form1.submit()">
        <?php
do {  
?>
        <option value="<?php echo $row_Names['CompleteName']?>"><?php echo $row_Names['CompleteName']?></option>
        <?php
} while ($row_Names = mysql_fetch_assoc($Names));
  $rows = mysql_num_rows($Names);
  if($rows > 0) {
      mysql_data_seek($Names, 0);
        $row_Names = mysql_fetch_assoc($Names);
  }
?>
                  </select>
 
   
      <br>
    </form></td>
  </tr>
  <tr valign="middle">
    <td valign="middle"><div align="left">
     
    </div>    </td>
    </tr>
  <tr valign="middle">
    <td valign="middle">&nbsp;</td>
    </tr>
  <tr valign="middle">
    <td valign="middle">&nbsp;</td>
  </tr>
</table>
</ul>
      </div>
      <div style="padding : 0; background : #ffffff;" #invalid_attr_id="1.5em 0.5em 0 0">
        <h1>&nbsp;</h1>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
      </div>
    </div>
    <div class="short_content">
      <h2>Funeral Listings</h2>
      <table width="510" border="0" cellpadding="2" background="../photos%20purchased/iStock_000002881336XSmall.png">
        <?php do { ?>
        <tr>
          <td colspan="2"><span class="style9 style9"><span class="style34"><?php echo $row_FuneralListing['FirstName']; ?>&nbsp;<?php echo $row_FuneralListing['LastName']; ?></span>&nbsp;of&nbsp;<span class="style33"><?php echo $row_FuneralListing['CityLivedIn']; ?></span>&nbsp;</span></td>
        </tr>
        <tr>
          <td><span class="style19"><span class="style9 style9"><?php echo $row_FuneralListing['FuneralID']; ?></span></span></td>
          <td width="374">&nbsp;</td>
        </tr>
        <tr>
          <td><span class="style20">Death Date: </span></td>
          <td><span class="style29"><?php echo $row_FuneralListing['DeathDate']; ?></span></td>
        </tr>
        <tr>
          <td><span class="style20">Service Date: </span></td>
          <td><span class="style29"><?php echo $row_FuneralListing['ServiceDate']; ?></span></td>
        </tr>
        <tr>
          <td><span class="style20">Time:</span></td>
          <td><span class="style29"><?php echo $row_FuneralListing['ServiceTime']; ?></span></td>
        </tr>
        <tr>
          <td><span class="style20">Service Type: </span></td>
          <td><span class="style29"><?php echo $row_FuneralListing['ServiceType']; ?></span></td>
        </tr>
        <tr>
          <td><span class="style20">Location:</span></td>
          <td><span class="style29"><?php echo $row_FuneralListing['SeviceLocation']; ?></span></td>
        </tr>
        <tr>
          <td><span class="style19"></span></td>
          <td>&nbsp;</td>
        </tr>
        <tr>
          <td><span class="style20">Cemetery:</span></td>
          <td><span class="style29"><?php echo $row_FuneralListing['Cemetery']; ?></span></td>
        </tr>
        <tr>
          <td><span class="style20">Plot Locaton: </span></td>
          <td><span class="style29"><?php echo $row_FuneralListing['PlotLocation']; ?></span></td>
        </tr>
        <tr>
          <td><span class="style20">Synagogue:</span></td>
          <td><span class="style29"><?php echo $row_FuneralListing['Synagogue']; ?></span></td>
        </tr>
        <tr>
          <td><span class="style19"></span></td>
          <td>&nbsp;</td>
        </tr></table>
            <table width="510" border="0">
  <tr>
    <td>&nbsp; </td>
  </tr>
  <tr>
    <td><div align="justify"><span class="style37"><?php echo $row_FuneralListing['Obituary']; ?></span></div></td>
  </tr>
</table>

            <table border="0">
          <tr>
            <td width="170"><span class="style51"></span></td>
            <td width="380"><span class="style51"></span></td>
            <td width="370">&nbsp;</td>
            <td width="370"><span class="style9"></span></td>
          </tr>
          <tr>
            <td><span class="style52">Shiva:</span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaDate1']; ?>&nbsp;&nbsp;</span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaDate2']; ?></span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaDate3']; ?></span></td>
          </tr>
          <tr>
            <td><span class="style9">Time:</span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaTime1']; ?></span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaTime2']; ?></span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaTime3']; ?></span></td>
          </tr>
          <tr>
            <td><span class="style9">Location: </span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaName1']; ?></span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaName2']; ?></span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaName3']; ?></span></td>
          </tr>
          <tr>
            <td><span class="style51"></span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaAddress1']; ?></span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaAddress2']; ?></span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaAddress3']; ?></span></td>
          </tr>
          <tr>
            <td><span class="style51"></span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaCity1']; ?>&nbsp;<?php echo $row_FuneralListing['ShivaST1']; ?>&nbsp;<?php echo $row_FuneralListing['ShivaZip1']; ?></span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaCity2']; ?><?php echo $row_FuneralListing['ShivaSt2']; ?><?php echo $row_FuneralListing['ShivaZip2']; ?></span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaCity3']; ?><?php echo $row_FuneralListing['ShivaSt3']; ?><?php echo $row_FuneralListing['ShivaZip3']; ?></span></td>
          </tr>
          <tr>
            <td><span class="style51"></span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaPhone1']; ?></span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaPhone2']; ?></span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaPhone3']; ?></span></td>
          </tr>
          <tr>
            <td><span class="style9">Notes:</span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaNotes1']; ?></span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaNotes2']; ?></span></td>
            <td><span class="style53"><?php echo $row_FuneralListing['ShivaNotes3']; ?></span></td>
          </tr>
          <tr>
            <td><span class="style51"></span></td>
            <td>&nbsp;</td>
            <td><span class="style51"></span></td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td><span class="style52">Synagogue : </span></td>
            <td><span class="style9"><?php echo $row_FuneralListing['SynagogueName']; ?></span></td>
            <td><span class="style9 style9"><?php echo $row_FuneralListing['SynagogueWebAddress']; ?></span></td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><span class="style9 style9"><?php echo $row_FuneralListing['SynagogueAddress']; ?></span></td>
            <td rowspan="3" valign="top"><span class="style9"><?php echo $row_FuneralListing['SynagogueNotes']; ?></span><span class="style9"></span></td>
            <td><span class="style9"></span></td>
          </tr>
          <tr>
            <td><span class="style9"></span></td>
            <td><span class="style9"><?php echo $row_FuneralListing['SynagogueCity']; ?>&nbsp;<?php echo $row_FuneralListing['SynagogueSt']; ?>&nbsp;<?php echo $row_FuneralListing['SynagogueZip']; ?> </span></td>
            <td><span class="style9"></span></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><span class="style9"><?php echo $row_FuneralListing['SynagoguePhone']; ?></span></td>
            <td><span class="style9"></span></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><span class="style9"></span></td>
            <td><span class="style9"></span></td>
            <td><span class="style9"></span></td>
          </tr>
          <tr>
            <td><span class="style52">Cemetery:</span></td>
            <td><span class="style9"><?php echo $row_FuneralListing['CemeteryName']; ?></span></td>
            <td rowspan="3" valign="top"><span class="style9"></span><span class="style9"><?php echo $row_FuneralListing['CemeteryNotes']; ?></span></td>
            <td><span class="style9"></span></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><span class="style9"><?php echo $row_FuneralListing['CemeteryAddress']; ?></span></td>
            <td><span class="style9"></span></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><span class="style9"><?php echo $row_FuneralListing['CemeteryCity']; ?>&nbsp;<?php echo $row_FuneralListing['CemeteryST']; ?>&nbsp;<?php echo $row_FuneralListing['CemeteryZip']; ?> </span></td>
            <td><span class="style9"></span></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><span class="style9"><?php echo $row_FuneralListing['CemeteryPhone']; ?></span></td>
            <td><span class="style9"></span></td>
            <td><span class="style9"></span></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><span class="style9"><?php echo $row_FuneralListing['CemeteryWebAddress']; ?></span></td>
            <td><span class="style9"></span></td>
            <td><span class="style9"></span></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td valign="top"><span class="style52">Charity: </span></td>
            <td colspan="3" rowspan="2" valign="top"><span class="style9"><?php echo $row_FuneralListing['Charity']; ?></span><span class="style9"></span><span class="style9"></span><span class="style9"></span><span class="style9"></span><span class="style9"></span></td>
          </tr>
          <tr>
            <td><span class="style9"></span></td>
          </tr>
          <tr>
            <td><span class="style9"></span></td>
            <td><span class="style9"></span></td>
            <td><span class="style9"></span></td>
            <td><span class="style9"></span></td>
          </tr>
          <tr>
            <td><span class="style9"></span></td>
            <td><span class="style9"></span></td>
            <td><span class="style9"></span></td>
            <td><span class="style9"></span></td>
          </tr>
          <tr>
            <td><span class="style9"></span></td>
            <td><span class="style9"></span></td>
            <td><span class="style9"></span></td>
            <td><span class="style9"></span></td>
          </tr>
          <tr>
            <td><span class="style9"></span></td>
            <td><span class="style9"></span></td>
            <td><span class="style9"></span></td>
            <td>&nbsp;</td>
            <?php } while ($row_FuneralListing = mysql_fetch_assoc($FuneralListing)); ?>
          </tr>
        </table>
            <div class="short_content2"></div>
    </div>
  </div>
 
 
  <div id="footer">
    <p>Copyright&copy; 2011 Chesed v'Emet <br />
       Designed by Weiskopf Consulting</p>
  </div>
</div>
</body>
</html>
<?php
mysql_free_result($FuneralListing);

mysql_free_result($Names);
?>
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
virginiawAuthor Commented:
ok,  I have it narrowed down to where the session_start(); is locate.  If i put it at the top of the page just below the require_once, then ie works but firefox doesn't.  If I move it to just before $varLookup_FuneralListing = "-1"; Then at the top of both page views (ie and firefox) function.session-start apprears.  

Please help,  what syntax am I missing?  
0
 
Dave BaldwinFixer of ProblemsCommented:
Your 'onchange' statement requires the form Name to be 'form1'.
<select name="selLookup" id="selLookup" onchange="form1.submit()">

Open in new window

0
 
Dave BaldwinFixer of ProblemsCommented:
Like this:
<form name="form1" id="form1" method="post" action="">

Open in new window

0
 
Dave BaldwinFixer of ProblemsCommented:
Yes, I saw that too.
0
 
virginiawAuthor Commented:
q
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.