capture checkbox clicks at server

Discussion in 'Javascript' started by Josh, Apr 7, 2005.

  1. Josh

    Josh Guest

    Here's what I want to do:

    I want to have a form on my page with a number of checkboxes. No submit
    button. When the user checks a box, I want that event to call an asp
    page on the server as if the user had submitted the form with that
    option selected. BUT, I do not want the user's browser to navigate to a
    new page, OR for the checked box to become unchecked or anything else.
    When they check another box I want the same thing to happen. Bonus
    points for when the user checks a box for the box to disappear and be
    replaced by a graphic saying "Thanks!" or something like that.

    help me out folks!!!
    Josh, Apr 7, 2005
    #1
    1. Advertising

  2. Josh

    kaeli Guest

    In article <>,
    enlightened us with...
    > I want to have a form on my page with a number of checkboxes. No submit
    > button. When the user checks a box, I want that event to call an asp
    > page on the server as if the user had submitted the form with that
    > option selected. BUT, I do not want the user's browser to navigate to a
    > new page, OR for the checked box to become unchecked or anything else.
    > When they check another box I want the same thing to happen. Bonus
    > points for when the user checks a box for the box to disappear and be
    > replaced by a graphic saying "Thanks!" or something like that.
    >
    > help me out folks!!!


    Go look at netflix's code. They have a very good implementation of something
    very similar (the voting with the stars and the stars change after you
    click). It's a pain, and long and complex, so I won't post it here. But it's
    quite neat.
    Go steal it from there. *g*

    --
    --
    ~kaeli~
    If a turtle doesn't have a shell, is he homeless or naked?
    http://www.ipwebdesign.net/wildAtHeart
    http://www.ipwebdesign.net/kaelisSpace
    kaeli, Apr 7, 2005
    #2
    1. Advertising

  3. Josh

    Josh Guest

    anyone have some actual code? Can't be that complicated!
    Josh, Apr 11, 2005
    #3
  4. Josh wrote:

    > I want to have a form on my page with a number of checkboxes. No submit
    > button. When the user checks a box, I want that event to call an asp
    > page on the server as if the user had submitted the form with that
    > option selected. BUT, I do not want the user's browser to navigate to a
    > new page,


    If your sender address would have been program, you would have known
    that this has been asked several times ad nauseam before. Look into
    `XMLHTTPRequest'.

    > OR for the checked box to become unchecked or anything else.


    You could try to cancel the `click' and/or `mousedown' event, returning
    `false' to the event handler. May not be cross-browser since it is part
    of the DOM.

    > When they check another box I want the same thing to happen. Bonus
    > points


    In which currency?

    > for when the user checks a box for the box to disappear


    Modify the `display' and/or `visibility' style properties of the
    object referenced by `this' in the event handler attribute value
    accordingly.

    > and be replaced by a graphic saying "Thanks!" or something like that.


    Modify the document tree using DOM methods accordingly.

    > help me out folks!!!


    [x] done


    PointedEars
    --
    > Nach und nach verschwinden in einem größeren Word-Dokument

    Das ist ein Programm zum Briefe-Schreiben. Nimm das einfach
    zur Kenntnis. Es gibt keine groesseren Word-Dokumente, nur
    Dokumente, die zu gross sind fuer Word. -- BGKS Kulms in fch
    Thomas 'PointedEars' Lahn, Apr 12, 2005
    #4
  5. Josh wrote:

    > anyone have some actual code? Can't be that complicated!


    This is not a support forum but a discussion group.


    PointedEars
    Thomas 'PointedEars' Lahn, Apr 12, 2005
    #5
  6. Josh

    Randy Webb Guest

    Thomas 'PointedEars' Lahn wrote:

    > Josh wrote:
    >
    >
    >>I want to have a form on my page with a number of checkboxes. No submit
    >>button. When the user checks a box, I want that event to call an asp
    >>page on the server as if the user had submitted the form with that
    >>option selected. BUT, I do not want the user's browser to navigate to a
    >>new page,

    >
    >
    > If your sender address would have been program, you would have known
    > that this has been asked several times ad nauseam before. Look into
    > `XMLHTTPRequest'.


    And if you had a brain, you would take it out and play with it. Some
    day, we can only hope that you gain the intelligence/knowledge to
    understand a simple fact:

    People munge email addresses in Usenet for a very good reason.

    The fact that you miss that, nor do you understand it, points to one of
    two possibilities:

    1) You are too stupid to realize it.
    2) You are an Email Harvester that wants only valid email addresses in
    your database.

    Which is it?

    --
    Randy
    comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
    Randy Webb, Apr 12, 2005
    #6
  7. JRS: In article <>, dated Tue, 12 Apr
    2005 21:03:33, seen in news:comp.lang.javascript, Thomas 'PointedEars'
    Lahn <> posted :
    >Josh wrote:
    >
    >> anyone have some actual code? Can't be that complicated!

    >
    >This is not a support forum but a discussion group.


    No, this is a Usenet newsgroup.

    Both discussion and direct problem-solving responses are perfectly in
    order. One may reasonably choose to reply in either form, or in a
    mixture.

    Bundesrepublikpolizei are, however, not in order.

    If you don't like it here, then you can take yourself elsewhere, which
    on the whole is likely to be better appreciated here than elsewhere.

    --
    © John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 IE 4 ©
    <URL:http://www.jibbering.com/faq/> JL/RC: FAQ of news:comp.lang.javascript
    <URL:http://www.merlyn.demon.co.uk/js-index.htm> jscr maths, dates, sources.
    <URL:http://www.merlyn.demon.co.uk/> TP/BP/Delphi/jscr/&c, FAQ items, links.
    Dr John Stockton, Apr 13, 2005
    #7
    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. =?Utf-8?B?RGF2ZQ==?=

    Capture server event when a user clicks a <TD>?

    =?Utf-8?B?RGF2ZQ==?=, Feb 8, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    542
    Frank Buchan
    Feb 11, 2005
  2. Max
    Replies:
    7
    Views:
    9,104
  3. PontiMax

    Clicks and double-clicks

    PontiMax, Jul 14, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    2
    Views:
    184
    Eliyahu Goldin
    Jul 14, 2004
  4. KK
    Replies:
    0
    Views:
    135
  5. Mufasa
    Replies:
    1
    Views:
    106
    marss
    Jul 26, 2007
Loading...

Share This Page