[Rails-spinoffs] Help me

2008-04-01 Thread nevil gandhi
Hello every budy,

   i m nevil,i m new in ajax and try to understand the
prototype.js so plz help me that how i use prototype.js and also tell me how
i apply ajax request throught prototype.js ,i refere the materials on
line but i cant get anything so plz reply me,



Thanks

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Ruby 
on Rails: Spinoffs group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~--~~~~--~~--~--~---



[Rails-spinoffs] Help me!About event handler using prototype.js

2007-03-26 Thread Vin

I create a button dynamically on the page,using input type='button'
id=btnOk onclick=fSubmit('add') value=Add/

now, i wanna let the button to trigger the fSubmit function with
another argument update,that is fSubmit('update'),and set it's value
to 'Update'.

i did it like this:
$(btnOk).value=Update;
$(btnOk).abserve(click,function(){fSubmit(update)});

it works!!But there's one problem puzzling me.
I click the button,it firstly trigger fSubmit('add'),and later
fSubmit('update').But my purpose is to trigger fSubmit('update')

Why?
And how can i reach my purpose?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Ruby 
on Rails: Spinoffs group.
To post to this group, send email to rubyonrails-spinoffs@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~--~~~~--~~--~--~---