2 Replies - 1334 Views - Last Post: 23 March 2011 - 06:33 PM Rate Topic: -----

#1 phpvirgin   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 23-March 11

php dropdown sending variable in ie but not in firefox

Posted 23 March 2011 - 05:34 PM

I a frustrated because my form works great in ie but not in firefox.
http://www.chesedvem...ralListings.php

see 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="">
     <span class="style56">Lookup Funeral Information </span><br />

      <select name="selLookup" id="selLookup" onchange="form1.submit()">
        <?php
do {  
?>
        $varLookup = $_GET["selLookup"]; 
        
        <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;&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);
?>

This post has been edited by CTphpnwb: 23 March 2011 - 06:46 PM
Reason for edit:: Added code tags


Is This A Good Question/Topic? 0
  • +

Replies To: php dropdown sending variable in ie but not in firefox

#2 Atli   User is offline

  • Enhance Your Calm
  • member icon

Reputation: 4241
  • View blog
  • Posts: 7,216
  • Joined: 08-June 10

Re: php dropdown sending variable in ie but not in firefox

Posted 23 March 2011 - 06:06 PM

Hey.

First of all, when your having issues like that, the first thing you should do is validate the markup. Fixes a lot of problems.


However, your problem seems to be with this line:
<select name="selLookup" id="selLookup" onchange="form1.submit()">



Internet Explorer automatically puts elements in the global scope, so you can reference them like that without needed to call the document.getElementById function. Firefox does not. You need to actually get the element to work with it in Firefox.

So that would be:
<select name="selLookup" id="selLookup" onchange="document.getElementById('form1').submit()">




Also, this seems to be printed into the HTML:
$varLookup = $_GET["selLookup"]; 


You might want to remove that, or put it into the PHP block.
Was This Post Helpful? 1
  • +
  • -

#3 phpvirgin   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 23-March 11

Re: php dropdown sending variable in ie but not in firefox

Posted 23 March 2011 - 06:33 PM

WOW!
thanks, I had been experimenting to get both to work. I was moving the start_session() but that was causing problems. thanks for explaining.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1