![]() |
onSelect/onDeselect working at same time?
I'm kinda a newbie to Javascript but i have seemed to figure out one part of what i am trying to do and need help with the second part. What i am trying to do is this checkbox that has a style from here http://lipidity.com/fancy-form/. But what i wanted was that once you click select or deselect the checkbox that it is automatically updated to the database. I was already doing something like this with a textarea and i finally figured out how to get it to work with my checkbox. I used part of the help the site gave..
Code:
FancyForm.start( 0, {and rearranged it and used some of my other code and got it to actually work for what i need. My code: Code:
FancyForm.start(0, { |
Something like the following would work for you:
javascript Code:
|
Thanks I was really hoping that was going to work. Unfortunately for some reason when i put that code of if i put
Code:
FancyForm.start(0, {thanks for your help |
Doesn't my solution work for you?
|
Sorry I meant to say your solution as well as the top code do the same thing....it eliminate the styles of the fancy form and then it doesn't even do anything when you select or deselect
|
Got it to work
window.addEvent('domready', function(){
FancyForm.start( 0, { onSelect: function(chk){ alert(chk.inputElement.getProperty('name')); alert(chk.inputElement.getProperty('checked')); }, onDeselect: function(chk){ alert(chk.inputElement.getProperty('name')); alert(chk.inputElement.getProperty('checked')); } }); }); |
try using jquery, that will surely work.
|
| All times are GMT. The time now is 12:58 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0