- Code: Select all
<?php
echo '
<script type="text/javascript">
function showSelection(_vipselection){
if (_vipselection > 0) {
if (_vipselection == 1){
_vipValue = _vipselection;
_vipselection = "Bronze";
location.href="test.php?_vipselection=" + _vipselection;
}else if (_vipselection == 2){
_vipselection = "Silver";
location.href="test.php?_vipselection=" + _vipselection;
}else if (_vipselection == 3){
_vipselection = "Gold";
location.href="test.php?_vipselection=" + _vipselection;
}else if (_vipselection == 4){
_vipselection = "Platinum";
location.href="test.php?_vipselection=" + _vipselection;
}
}else
exit();
}
</script>';
echo ' <select name="VIP_TYPE" onchange="showSelection(this.value);">
<option>Select a VIP Type</option>
<option value="1">VIP-Bronze</option>
<option value="2">VIP-Silver</option>
<option value="3">VIP-Gold</option>
<option value="4">VIP-Platinum</option>
</select>
<br/>
<select name="VIP_DAYS" onchange="showCost(this.value);">
<option>Select a VIP_Days</option>
<option value="1">1 Day</option>
<option value="2">3 Days</option>
<option value="3">7 Days</option>
<option value="4">1 Month</option>
</select>';
echo "<h1>Value is:</h1>";
echo "vipselection : ".$_GET['_vipselection']."<br>";
echo "vipselection : ".$_GET['_vipselection']."<br>";
?>
How can i focus the combobox when i choose. example when i select silver it will post that i get silver when my combobox has been refresh i can't continue the next step of registration.

