Forum Moderators: coopster

Message Too Old, No Replies

Using Span to grab display content ?

I dont get it..

         

dauction

9:56 pm on May 8, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is for Map..

Suppose to display a drop down menu for US States..you select the states and then a drop down menu for the Citys appear (for that State)

The City drop down menu no longer displays ...not sure what the issue is

It use to work..and not sure what the original code looked like .. I have the ajax file as well

Anyway.. the <span> city</> that is what that does right ..it displays the drop down menu with the cities from the $query above correct ?

<td id="col1" align="left">
<!--State Option Box-->
<div style="padding:0 0 5px 10px">
<h2>Search</h2>
<b>State:</b>

<select name="state" onclick="goToState('http://oursite.com/map.php?q=allCins&amp;ids=' + this.value,this.options[this.selectedIndex].text);GetFile('http://woursite.com/ajax.php?action=cins&amp;sid=' + this.value,'city')">
<?php
$Query = "SELECT * FROM `states` ORDER BY `state` ASC";
$Rows = $Db->Rows($Query);
$Result = $Db->Query($Query);
for($i = 0; $i < $Rows; $i++){
$id = $Db->Result($Result, $i, 'id');
$State = $Db->Result($Result, $i, 'state');
echo '<option id="statesOptions'.$id.'" value="'.$id.'">'.$State.'</option>';
}?></select>
<span id="city"></span>

</div>

dauction

10:59 pm on May 8, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The Cities DO appear(populate) on the API Map when you "SELECT" a a particular State.. the Problem is we can no longer "SELECT" a City because the the City drop down menu doesnt appear