View Full Version : posting page

11-19-2007, 05:06 PM
the page looks like that

in what way got to be the code built in order to check wich checkbox was checked and to get and update only the checked records fields?

11-19-2007, 05:18 PM
what is the best way to set checks on the check boxs if it is checked or not...and to start reading those checked row fields?

11-19-2007, 05:54 PM
First, take the start of the form out of the loop and end it after the submit button, that way everything in your loop plus the submit button is in your form.

Next, change the checkboxes to radio and make sure they all have the same name and also have the loop put the credit card name as the value. This will then give your end user only one options to choose. Then, your text boxes will continue to be enabled and disabled with your javascript.

In your form processing, your Request.Form("radiobuttonnamehere") will hold the value of whatever credit card name they've selected.


11-19-2007, 06:00 PM
can you show some main part od the code?

11-19-2007, 06:35 PM

<form name="example" action="billing.asp" method="POST">
<table border=0>
Dim count
count = 0
' start loop
count = count + 1
<input type="radio" name="creditcard" value="<%=rs("creditcardname")%>" onclick="enableDisable(this,'a<%=count%>','b<%=count%>','c<%=count%>','submit')" />
<td><input type="text" name="a<%=count%>" value="<%=rs("ccaddvalue")%>" disabled onKeyUp="if (isNaN(this.value)) this.value=this.value.replace(/[^0-9.]/g,'')" /></td>
<td><input type="text" name="b<%=count%>" value="<%=rs("ccaddpercent")%>" disabled onKeyUp="if (isNaN(this.value)) this.value=this.value.replace(/[^0-9.]/g,'')" /></td>
<td><input type="text" name="c<%=count%>" value="<%=rs("ccminpay")%>" disabled onKeyUp="if (isNaN(this.value)) this.value=this.value.replace(/[^0-9.]/g,'')" /></td>
' end loop
<tr><td colspan=4>
<input type="submit" value="add!" id="submit1" name="submit" disabled="disabled" />