Salve ragazzi ho un problema come potete vedere ho realizzato una simulazione di un menu con on click sul button fin qui tutto ok....ora ho acquisito una variabile (idcat) che mi occorre per eseguire una query e realizzare il menu nel secondo button....come posso fare???
GRAZIE
<html>
<script language="javascript">
<!--
function viewGuide(){
document.getElementById('guides').style.visibility ="visible";
}
function hideGuide(){
document.getElementById('guides').style.visibility ="hidden";
}
function selCategoria(idCat, cat){
document.form1.cat.value=cat;
document.form1.sottocat.disabled=false;
document.form1.buttSotto.disabled=false;
document.form1.idS.value = idCat;
}
//-->
</script>
<body>
<form method="post" name="form1" >
<input name="cat" size="30" style="height: 25px;"> <input type="button" value="." onclick="viewGuide();">
</p>
</p>
</p>
<input name="sottocat" size="30" style="height: 25;width:218" disabled> <input type="button" name="buttSotto" value="." disabled>
</form>
<DIV id="guides" style="BORDER: 1px solid Black; VISIBILITY:hidden; left: 242px; WIDTH: 146px; POSITION: absolute; up: 200px; BACKGROUND-COLOR: #ffffff; top:23px; height:122px; overflow: auto">
<%
selCat="SELECT id, Descrizione FROM Cat_Prod"
SET RS = objConn.Execute (selCat)
WHILE NOT RS.EOF
%>
<a onclick="selCategoria('<%=RS("id")%>', '<%=RS("Descrizione")%>'); hideGuide();"><%=RS("Descrizione")%></a>
<%
RS.MoveNext
WEND
SET RS = Nothing
%>
</body>
</html>

Rispondi quotando