Mirovk wrote on 22 aug 2006 in microsoft.public.inetserver.asp.general:
Evertjan. ha escrito:
>Mirovk wrote on 22 aug 2006 in
microsoft.public.inetserver.asp.general:
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)
[....]
>
<SCRIPT FOR="btn_tipo_pago" EVENT="onclick" LANGUAGE="VBScript">
Wait a minute - you're talking .NET aren't you?
[please do not toppost on usenet]
Yes this is classic ASP not .NET
I doubt that. If so it does not work that way.
With classical ASP
if sValue=3 then
<%session("tipo_pago") = 3 %>
else
if sValue=4 then
<%session("tipo_pago") = 4 %>
an onclick [clientside!] action cannot do a serverside action,
like changing a session variable's value.
>This is a classic asp newsgroup. ASP.NET is totally different.
Try over at microsoft.public.dotnet.framework.aspnet.
If you can help me I will appreciatte.
Setting a session variable as a result of an onclick needs a trip to the
server, usually by submitting a <form>, [but could be don by AJAX, etc.]
I even doubt you can do the above in asp.net,
but that is not my experise,
and off-topic in this NG.
[btw: vbscript has "elseif",
which would help you simplifying your code,
by getting rid of the multiple "end if"s.]
[btw: clientside vbscript works only on IE.]
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)