Professional Web Applications Themes

asp checkbox - ASP Components

Kerri, Do a search for the checkbox list object and how to databind it. It think that's what will work best for you. Sincerely, -- S. Justin Gengo, MCP Web Developer Free code library at: [url]www.aboutfortunate.com[/url] "Out of chaos comes order." Nietzche "Kerri" <kerrinospam.com> wrote in message news:02eb01c35dda$1261f850$a101280aphx.gbl... > Hi, > > I have a series of checkboxes on a web page. > > Based on what the user checks I write a record to a > Database Table. > > I want to associate each checkbox item with an IDENTITY > in an existing DB Table that holds these ...

  1. #1

    Default Re: asp checkbox

    Kerri,

    Do a search for the checkbox list object and how to databind it. It think
    that's what will work best for you.

    Sincerely,

    --
    S. Justin Gengo, MCP
    Web Developer

    Free code library at:
    [url]www.aboutfortunate.com[/url]

    "Out of chaos comes order."
    Nietzche


    "Kerri" <kerrinospam.com> wrote in message
    news:02eb01c35dda$1261f850$a101280aphx.gbl...
    > Hi,
    >
    > I have a series of checkboxes on a web page.
    >
    > Based on what the user checks I write a record to a
    > Database Table.
    >
    > I want to associate each checkbox item with an IDENTITY
    > in an existing DB Table that holds these options.
    >
    > This way I have the IDENTITY and just have to add to
    > other table.
    >
    > Does anyone know how I can do this or do I have to query
    > the database for each checkbox checked?
    >
    > Thanks,
    > Kerri.

    S. Justin Gengo Guest

  2. #2

    Default asp checkbox

    I have a form with ship to customer and bill to customer fields. Both of
    these are required fields. I want to put a check box in the form and if the
    check box is checked then the value of the ship to customer is loaded into
    the bill to customer. I need this to happen before the form is submitted.
    can I do this with ASP?

    The person fills in the ship to customer and if the bill to customer is the
    same then they just check the box and the same value is automatically
    entered. If they are different then he just types the bill to customer in.

    Thanks!
    Darren


    Darren Woodbrey Guest

  3. #3

    Default Re: asp checkbox

    Here's a JavaScript function I used once that copied Billing fields to
    Shipping fields that hopefully might give you some ideas:

    function jsCopyBillFieldsToShipFields() {
    // This function is triggered by button's onclick.

    // Dim var.
    var frm;

    // Form.
    frm = doent.frmMain

    // Set form fld.
    frm.ShipName.value = frm.DistribName.value;
    frm.ShipContactName.value = frm.Contact1Name.value;
    frm.ShipAddress1.value = frm.DistAddress1.value;
    frm.ShipAddress2.value = frm.DistAddress2.value;
    frm.ShipCity.value = frm.DistCity.value;
    frm.ShipState.value = frm.DistState.value;
    frm.ShipZipCode.value = frm.DistZipCode.value;
    frm.ShipPhone.value = frm.DistPhone.value;
    frm.ShipFax.value = frm.DistFax.value;
    }

    Best regards,
    J. Paul Schmidt, Freelance ASP Web Designer
    [url]http://www.Bullschmidt.com[/url]
    ASP Designer Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


    *** Sent via Devdex [url]http://www.devdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Bullschmidt Guest

  4. #4

    Default Re: asp checkbox

    Thanks for the reply. I have this code, but nothing happens when I check
    the box:

    <script language="JavaScript">

    function jscopyshiptobill()
    {
    var form1;
    form1 = doent.form1Main
    form1.billto.value = form1.customer.value;
    form1.billtoaddress1.value = form1.street.value;
    form1.billtocity.value = form1.city.value;
    form1.billtostate.value = form1.state.value;
    form1.billtozip.value = form1.zip.value;
    }
    </script>
    The checkbox looks like this:

    <input name="checkbox" type="checkbox"
    onClick="MM_callJS('jscopyshiptobill')" value="checkbox">

    I am not familiar with javascript. Can you tell what I am doing wrong?
    Thanks!
    "Bullschmidt" <paulbullschmidt.com-nospam> wrote in message
    news:ON5kD5WXEHA.2840TK2MSFTNGP11.phx.gbl...
    > Here's a JavaScript function I used once that copied Billing fields to
    > Shipping fields that hopefully might give you some ideas:
    >
    > function jsCopyBillFieldsToShipFields() {
    > // This function is triggered by button's onclick.
    >
    > // Dim var.
    > var frm;
    >
    > // Form.
    > frm = doent.frmMain
    >
    > // Set form fld.
    > frm.ShipName.value = frm.DistribName.value;
    > frm.ShipContactName.value = frm.Contact1Name.value;
    > frm.ShipAddress1.value = frm.DistAddress1.value;
    > frm.ShipAddress2.value = frm.DistAddress2.value;
    > frm.ShipCity.value = frm.DistCity.value;
    > frm.ShipState.value = frm.DistState.value;
    > frm.ShipZipCode.value = frm.DistZipCode.value;
    > frm.ShipPhone.value = frm.DistPhone.value;
    > frm.ShipFax.value = frm.DistFax.value;
    > }
    >
    > Best regards,
    > J. Paul Schmidt, Freelance ASP Web Designer
    > [url]http://www.Bullschmidt.com[/url]
    > ASP Designer Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
    >
    >
    > *** Sent via Devdex [url]http://www.devdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    Darren Woodbrey Guest

  5. #5

    Default Re: asp checkbox

    Just saw that there was an "error on page" message. It says that "billto"
    is NULL or not an object.

    Thanks
    Darren

    "Darren Woodbrey" <darrenwoodbreyhpfairfield.com> wrote in message
    news:Oa4GPceXEHA.2544TK2MSFTNGP10.phx.gbl...
    > Thanks for the reply. I have this code, but nothing happens when I check
    > the box:
    >
    > <script language="JavaScript">
    >
    > function jscopyshiptobill()
    > {
    > var form1;
    > form1 = doent.form1Main
    > form1.billto.value = form1.customer.value;
    > form1.billtoaddress1.value = form1.street.value;
    > form1.billtocity.value = form1.city.value;
    > form1.billtostate.value = form1.state.value;
    > form1.billtozip.value = form1.zip.value;
    > }
    > </script>
    > The checkbox looks like this:
    >
    > <input name="checkbox" type="checkbox"
    > onClick="MM_callJS('jscopyshiptobill')" value="checkbox">
    >
    > I am not familiar with javascript. Can you tell what I am doing wrong?
    > Thanks!
    > "Bullschmidt" <paulbullschmidt.com-nospam> wrote in message
    > news:ON5kD5WXEHA.2840TK2MSFTNGP11.phx.gbl...
    > > Here's a JavaScript function I used once that copied Billing fields to
    > > Shipping fields that hopefully might give you some ideas:
    > >
    > > function jsCopyBillFieldsToShipFields() {
    > > // This function is triggered by button's onclick.
    > >
    > > // Dim var.
    > > var frm;
    > >
    > > // Form.
    > > frm = doent.frmMain
    > >
    > > // Set form fld.
    > > frm.ShipName.value = frm.DistribName.value;
    > > frm.ShipContactName.value = frm.Contact1Name.value;
    > > frm.ShipAddress1.value = frm.DistAddress1.value;
    > > frm.ShipAddress2.value = frm.DistAddress2.value;
    > > frm.ShipCity.value = frm.DistCity.value;
    > > frm.ShipState.value = frm.DistState.value;
    > > frm.ShipZipCode.value = frm.DistZipCode.value;
    > > frm.ShipPhone.value = frm.DistPhone.value;
    > > frm.ShipFax.value = frm.DistFax.value;
    > > }
    > >
    > > Best regards,
    > > J. Paul Schmidt, Freelance ASP Web Designer
    > > [url]http://www.Bullschmidt.com[/url]
    > > ASP Designer Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...
    > >
    > >
    > > *** Sent via Devdex [url]http://www.devdex.com[/url] ***
    > > Don't just participate in USENET...get rewarded for it!
    >
    >

    Darren Woodbrey Guest

  6. #6

    Default Re: asp checkbox

    And here are some other newsgroups you may want to check out. For
    non-component, classic ASP questions:
    microsoft.public.inetserver.asp.general

    For JavaScript questions:
    microsoft.public.scripting.jscript

    Best regards,
    J. Paul Schmidt, Freelance ASP Web Designer
    [url]http://www.Bullschmidt.com[/url]
    ASP Designer Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


    *** Sent via Devdex [url]http://www.devdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Bullschmidt Guest

  7. #7

    Default Re: asp checkbox

    Perhaps change this:
    <input name="checkbox" type="checkbox"
    onClick="MM_callJS('jscopyshiptobill')" value="checkbox">

    To be more like this instead (i.e. using the actual name of the
    JavaScript function:
    <input name="checkbox" type="checkbox"
    onclick="jscopyshiptobill()" value="checkbox">

    And of course check your form tag to be sure that the name of the form
    is really form1Main.

    Best regards,
    J. Paul Schmidt, Freelance ASP Web Designer
    [url]http://www.Bullschmidt.com[/url]
    ASP Designer Tips, ASP Web Database Demo, Free ASP Bar Chart Tool...


    *** Sent via Devdex [url]http://www.devdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Bullschmidt Guest

Similar Threads

  1. [PHP] Q: How to get the value of a checkbox of which name without '[]'?
    By Cpt John W. Holmes in forum PHP Development
    Replies: 1
    Last Post: April 12th, 05:27 AM
  2. checkbox
    By wildt in forum ASP
    Replies: 8
    Last Post: May 2nd, 07:34 PM
  3. Replies: 4
    Last Post: June 13th, 02:29 AM
  4. How can I get the checkbox's value
    By Jack in forum ASP
    Replies: 1
    Last Post: October 14th, 05:27 AM
  5. Q: How to get the value of a checkbox of which name without '[]'?
    By Dallas Thunder in forum PHP Development
    Replies: 3
    Last Post: August 18th, 08:42 PM

Bookmarks

Posting Permissions

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139