The onclick action associated to my form´s radio buttons call to a
vbscript were the session values are changed, this happens correctly
but with the onclick action associated to my continue button always
shows the value =1 instead the values selected under my radio buttons
(Values= 4,3 or 1)
I am showing the code.
Ideas welcome.
Thanks....
1.- Radio Buttons:
<td width="58%" class="titulos2 "><input type="radio" checked
name="btn_tipo_ pago" value="3" >
<td width="58%" class="titulos2 "><input type="radio" unchecked
name="btn_tipo_ pago" value="4">
<tr><td class="titulos2 "><input type="radio" unchecked
name="btn_tipo_ pago" value="1" >
2.- Script for handling onclick event (shows the correct values
assigned at the radio button):
<SCRIPT FOR="btn_tipo_p ago" EVENT="onclick" LANGUAGE="VBScr ipt">
Dim oElement, oElements, oRadio
Dim sValue
set oElements = Document.frmdir .Elements
for each oElement in oElements
if oElement.Type= "radio" and oElement.Checke d = True then
set oRadio = oElement
Exit for
End if
next
sValue = oRadio.value
************ IN sValue THERE IS THE VALUE OF THE RADIO BUTTON SELECTED
*************
if sValue=3 then
<%chk_pago=3% >
alert <%=chk_pago%>
<%session("tipo _pago") = chk_pago%>
alert("<%=Sessi on("tipo_pago") %>")
else
if sValue=4 then
<%chk_pago=4% >
alert <%=chk_pago%>
<%session("tipo _pago") = chk_pago%>
alert("<%=Sessi on("tipo_pago") %>")
else
if sValue=1 then
<%chk_pago=1% >
alert <%=chk_pago%>
<%session("tipo _pago") = chk_pago%>
alert("<%=Sessi on("tipo_pago") %>")
else
alert "Error"
end if
end if
end if
</script>
3.- Continue button:
<a name="continuar " class="normal_s ub" style="cursor:h and;">Finalizar
Compra</a>
4.- Script to check if the values assigned were correct (it´s
suppoused becase were show correctly on the last script, but it´s not
because always shows the "1" as value for both variable)
<SCRIPT FOR="continuar" EVENT="onclick" LANGUAGE="VBScr ipt">
alert <%=chk_pago%
alert("<%=Sessi on("tipo_pago") %>")
</script>
vbscript were the session values are changed, this happens correctly
but with the onclick action associated to my continue button always
shows the value =1 instead the values selected under my radio buttons
(Values= 4,3 or 1)
I am showing the code.
Ideas welcome.
Thanks....
1.- Radio Buttons:
<td width="58%" class="titulos2 "><input type="radio" checked
name="btn_tipo_ pago" value="3" >
<td width="58%" class="titulos2 "><input type="radio" unchecked
name="btn_tipo_ pago" value="4">
<tr><td class="titulos2 "><input type="radio" unchecked
name="btn_tipo_ pago" value="1" >
2.- Script for handling onclick event (shows the correct values
assigned at the radio button):
<SCRIPT FOR="btn_tipo_p ago" EVENT="onclick" LANGUAGE="VBScr ipt">
Dim oElement, oElements, oRadio
Dim sValue
set oElements = Document.frmdir .Elements
for each oElement in oElements
if oElement.Type= "radio" and oElement.Checke d = True then
set oRadio = oElement
Exit for
End if
next
sValue = oRadio.value
************ IN sValue THERE IS THE VALUE OF THE RADIO BUTTON SELECTED
*************
if sValue=3 then
<%chk_pago=3% >
alert <%=chk_pago%>
<%session("tipo _pago") = chk_pago%>
alert("<%=Sessi on("tipo_pago") %>")
else
if sValue=4 then
<%chk_pago=4% >
alert <%=chk_pago%>
<%session("tipo _pago") = chk_pago%>
alert("<%=Sessi on("tipo_pago") %>")
else
if sValue=1 then
<%chk_pago=1% >
alert <%=chk_pago%>
<%session("tipo _pago") = chk_pago%>
alert("<%=Sessi on("tipo_pago") %>")
else
alert "Error"
end if
end if
end if
</script>
3.- Continue button:
<a name="continuar " class="normal_s ub" style="cursor:h and;">Finalizar
Compra</a>
4.- Script to check if the values assigned were correct (it´s
suppoused becase were show correctly on the last script, but it´s not
because always shows the "1" as value for both variable)
<SCRIPT FOR="continuar" EVENT="onclick" LANGUAGE="VBScr ipt">
alert <%=chk_pago%
alert("<%=Sessi on("tipo_pago") %>")
</script>
Comment