Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5

Thread: posting page

  1. #1
    Regular Coder
    Join Date
    Sep 2007
    Posts
    179
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Lightbulb posting page

    the page looks like that
    http://ilmc.brinkster.net/comersus/crm/00help2.asp

    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?
    Last edited by sasha85; 11-19-2007 at 05:50 PM.
    By the time u recognize this moment, This moment will be gone.

  • #2
    Regular Coder
    Join Date
    Sep 2007
    Posts
    179
    Thanks
    4
    Thanked 0 Times in 0 Posts
    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?
    Last edited by sasha85; 11-19-2007 at 05:52 PM.
    By the time u recognize this moment, This moment will be gone.

  • #3
    Senior Coder TheShaner's Avatar
    Join Date
    Sep 2005
    Location
    Orlando, FL
    Posts
    1,126
    Thanks
    2
    Thanked 40 Times in 40 Posts
    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.

    -Shane

  • #4
    Regular Coder
    Join Date
    Sep 2007
    Posts
    179
    Thanks
    4
    Thanked 0 Times in 0 Posts

    i don't realy get you...

    can you show some main part od the code?
    By the time u recognize this moment, This moment will be gone.

  • #5
    Senior Coder TheShaner's Avatar
    Join Date
    Sep 2005
    Location
    Orlando, FL
    Posts
    1,126
    Thanks
    2
    Thanked 40 Times in 40 Posts
    Example:
    Code:
    <form name="example" action="billing.asp" method="POST">
    <table border=0>
    <tr>
    <th>payway</th>
    <th>add</th>
    <th>percentadd</th>
    <th>minpay</th>
    </tr>
    <%
      Dim count
      count = 0
      ' start loop
      count = count + 1
    %>
    <tr>
    <td>
    <input type="radio" name="creditcard" value="<%=rs("creditcardname")%>" onclick="enableDisable(this,'a<%=count%>','b<%=count%>','c<%=count%>','submit')" /> 
    <%=rs("creditcardname")%>
    </td>
    <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>
    </tr>
    <%
      ' end loop
    %>
    <tr><td colspan=4>
    <input type="submit" value="add!" id="submit1" name="submit" disabled="disabled" />
    </td></tr>
    </table>
    </form>
    -Shane


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •