richcleverley
MIS
Hi all,
Hope someone can help on this one.
I have a form which has dynamically populated dropdowns (one depends on the choise in the previous). There is also an input box that needs to be filled in before submission.
Now, the problem is that in Firefox I can't get the input box to keeps it's focus. In IE everything is fine but when I click in the box in FF the focus switched back to the dropdown bow above.
Here is the code (it has some php stuff and javascript calls in there to control the second input box).
Anyone know why this might be happening.
Thanks,
Richard
Hope someone can help on this one.
I have a form which has dynamically populated dropdowns (one depends on the choise in the previous). There is also an input box that needs to be filled in before submission.
Now, the problem is that in Firefox I can't get the input box to keeps it's focus. In IE everything is fine but when I click in the box in FF the focus switched back to the dropdown bow above.
Here is the code (it has some php stuff and javascript calls in there to control the second input box).
Code:
<form action="villasearch.php" method="post" name="proprent" id="proprent" onsubmit="YY_checkform('proprent','Bedrooms','#q','1','Number of Bedrooms must be selected');return document.MM_returnValue">
<label> <br />
<span class="formspacing">
<?
echo "<select name='country' onchange=\"reload(this.form)\" class=\"formelements\"><option value='' >Country?</option>";
while($noticia2 = mysql_fetch_array($quer2)) {
if($noticia2['cid']==@$country){echo "<option selected value='$noticia2[cid]'>$noticia2[country_name]</option>"."<BR>";}
else{echo "<option value='$noticia2[cid]'>$noticia2[country_name]</option>";}
}
echo "</select>";
?>
</span><br />
<br />
</label>
<label>
<?
echo "<select name='region' class=\"formelements\"><option value=''>Region?</option>";
while($noticia = mysql_fetch_array($quer)) {
echo "<option value='$noticia[rid]'>$noticia[region_name]</option>";
}
echo "</select>";
?>
<br />
<br />
<input name="beds" class="formelements" id="beds" onFocus="if(this.value=='Bedrooms?')this.value='';" value="Bedrooms?"/>
</label>
<br />
<br />
<div align="right">
<label>
<input type="submit" name="Submit" value="Submit" />
</label>
</div>
</form>
Anyone know why this might be happening.
Thanks,
Richard