Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_databases thread: How to retain the value of a checkbox on clicking the submit but- ton


Message #1 by Anupama Nallari <ANallari@p...> on Fri, 28 Sep 2001 11:08:09 -0500

Hi,

If a checkbox is clicked then when the user clicks on the submit button I

still want to show the checkbox as on. The problem as of now is that as soon

as the user clicks the submit button the checkbox the checkbox is set to

off. I tried like using javascript window.formname.checkbox.checked=true but

that does not work.



Thanks,

Anu

Message #2 by "Garrison, Tom" <tom.garrison@e...> on Fri, 28 Sep 2001 12:07:24 -0500
I am assuming you are calling the same page again after the user clicks

submit and updating values.  You can use a variable to control this.  



		

checkval = "checked"

			



Then use the variable in your radio buttion statement.



<input TYPE="RADIO" NAME="results" VALUE="all" <%=checkval%>>



Every time you load the page the radio button will be set to checked.



Hope this helps,



Tom



-----Original Message-----

From: Anupama Nallari [mailto:ANallari@p...]

Sent: Friday, September 28, 2001 11:08 AM

To: ASP Databases

Subject: [asp_databases] How to retain the value of a checkbox on

clicking the submit but ton







Hi,

If a checkbox is clicked then when the user clicks on the submit button I

still want to show the checkbox as on. The problem as of now is that as soon

as the user clicks the submit button the checkbox the checkbox is set to

off. I tried like using javascript window.formname.checkbox.checked=true but

that does not work.



Thanks,

Anu

  Return to Index