Code: Select all
<select name="category" id="category" onChange="Fxn();">
<?PHP
$Qry = "Select * from category where Parent='0' order by Cname";
$Res = mysql_db_query($db,$Qry,$cid);
$Num = mysql_num_rows($Res);
if($Num > 0){
while($Row = mysql_fetch_object($Res)){
$Cid = $Row -> CategoryID ;
$Cname =$Row -> Cname ;
$Parent = $Row -> Parent;
?>
<option value="<?=$Cid?>">
<?=$Cname?>
</option>
<?PHP
}
}
?>
</select>
<script language="JavaScript" type="text/javascript">
function Fxn(){
їb]var temp = document.form1.category.value;ї/b]
alert (temp);
window.location.replace("addnewproduct.php?category=" + temp);
temp;
}
</script>problem is that i m not able to fetch the value by above stmt.
can any do it for me?
Regards.