<form name = "openclosegates" method = "post">
<input id = radiogroup type="radio" name="RadioGroup" <%if orsopenclose.fields("QP_atquota") = 0 then %> checked <% end if%> VALUE="0"> Open Gates   ;
<INPUT id = radiogroup1 type="radio" name="RadioGroup" <%if orsopenclose.fields("QP_atquota") = 1 then %> checked <% end if%> VALUE="1">Close Gates <br><br>
<INPUT id="btnsubmit" type="submit" value="Submit" onclick ="refresh()" name="Btnsubmit">
<input id = "gates" type = "hidden" name = "gates" value= <%=oldgatesvalue%>
</form>
<%'When submit is hit only then execute this stored procedure-Updatetablequotaparams
'this stored procedure has 2 input parameters - Open/Close gates value and staff id of the
' person who updated the Open/Close value.
%>
<% if fsubmit <> "" then
gatesvalue = request.Form("radiogroup")
oldgatesvalue = request.Form("gates")
if oldgatesvalue <> gatesvalue then
set oCmd = server.CreateObject("ADODB.Command")
oCmd.ActiveConnection = oConn
oCmd.CommandType = 4
oCmd.CommandText = "updatetablequotaparams"
call oCmd.Parameters.Append(oCmd.CreateParameter("@gate svalue", 2, adparaminput))
call oCmd.Parameters.Append(oCmd.CreateParameter("@staf fid", 3, adparaminput))
oCmd.Parameters("@gatesvalue") = gatesvalue
oCmd.Parameters("@staffid") = staffid
oCmd.Execute%>
<script language="vbscript">
msgbox ("Record Updated!")
</script>
<%else%>
<script language="vbscript">
msgbox ("It is already set to this value. Record Cannot Be Updated!")
</script>
<%end if%>
<%end if %>
after the update i want the new radio button values to show up in the right button but it doesnt refresh until u refresh the page
|