javascript checkbox

Discussion in 'ASP .Net' started by =?Utf-8?B?cm9kY2hhcg==?=, Aug 24, 2006.

  1. hey all,

    just wondering about something i noticed.

    if i add a new html page to my project and i drag a checkbox out on to the
    page and double-click it to create a client-side click event i get the
    following:

    onclick="return Checkbox1_onclick()

    why do you need the return keyword?

    thanks,
    rodchar
     
    =?Utf-8?B?cm9kY2hhcg==?=, Aug 24, 2006
    #1
    1. Advertisements

  2. rodchar,

    if the script function (if some validation logic fails) returns false,
    checkbox will not be checked (if it is in unchecked state) otherwise, it will
    change to checked state.

    Regards,
    Augustin
    http://augustinprasanna.blogspot.com

    "rodchar" wrote:

    > hey all,
    >
    > just wondering about something i noticed.
    >
    > if i add a new html page to my project and i drag a checkbox out on to the
    > page and double-click it to create a client-side click event i get the
    > following:
    >
    > onclick="return Checkbox1_onclick()
    >
    > why do you need the return keyword?
    >
    > thanks,
    > rodchar
    >
    >
     
    =?Utf-8?B?QXVndXN0aW4gUHJhc2FubmE=?=, Aug 25, 2006
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. tshad
    Replies:
    0
    Views:
    744
    tshad
    Apr 15, 2005
  2. Vikram

    disable checkbox list checkbox

    Vikram, Jan 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,574
    ThunderMusic
    Jan 25, 2006
  3. =?Utf-8?B?RG90TmV0RGV2?=

    DataGrid and embeded Checkbox..How to find if checkbox clicked

    =?Utf-8?B?RG90TmV0RGV2?=, Oct 6, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,026
    David Wier
    Oct 6, 2006
  4. Jason Huang
    Replies:
    0
    Views:
    708
    Jason Huang
    Jun 29, 2007
  5. Joey Pang
    Replies:
    4
    Views:
    851
    Joey Pang
    Jun 13, 2005
  6. Imran Aziz

    checkbox value attribute in checkbox control ?

    Imran Aziz, Aug 6, 2005, in forum: ASP .Net Web Controls
    Replies:
    2
    Views:
    356
    Imran Aziz
    Aug 8, 2005
  7. Michael Champagne
    Replies:
    4
    Views:
    620
    Matt Kruse
    Apr 20, 2004
  8. Terje
    Replies:
    5
    Views:
    582
    Evertjan.
    Nov 18, 2004
Loading...