![]() |
capture checkbox clicks at server
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!!! |
Re: capture checkbox clicks at server
In article <1112887750.166863.34260@f14g2000cwb.googlegroups. com>,
googlemyass@undertone.com 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 |
Re: capture checkbox clicks at server
anyone have some actual code? Can't be that complicated!
|
Re: capture checkbox clicks at server
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 |
Re: capture checkbox clicks at server
Josh wrote:
> anyone have some actual code? Can't be that complicated! This is not a support forum but a discussion group. PointedEars |
Re: capture checkbox clicks at server
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 |
Re: capture checkbox clicks at server
JRS: In article <4205210.gvN19Bg2ir@PointedEars.de>, dated Tue, 12 Apr
2005 21:03:33, seen in news:comp.lang.javascript, Thomas 'PointedEars' Lahn <PointedEars@web.de> 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. |
| All times are GMT. The time now is 03:14 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.