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. Advertising

  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. Advertising

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:
    565
    tshad
    Apr 15, 2005
  2. Vikram

    disable checkbox list checkbox

    Vikram, Jan 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    1,424
    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:
    858
    David Wier
    Oct 6, 2006
  4. Jason Huang
    Replies:
    0
    Views:
    581
    Jason Huang
    Jun 29, 2007
  5. Michael Champagne
    Replies:
    4
    Views:
    353
    Matt Kruse
    Apr 20, 2004
Loading...

Share This Page