mex23
1
How do I pass more than one parameter through :with in a field observer?
Here is my code:
< %= observe_field(’article_image_id’,
:frequency => 0.25,
:update => ‘image_preview’,
:url => { :action => :image_preview },
:with => “‘id=’+valueâ€) %>
I need to pass also another value. How should I modify the code?
Thanks
Stefano
mex23
2
You’re just building up a string that represents the query string for
the http request using javascript,so add
‘&my_new_param=’+my_param_value
On Jun 1, 6:04 pm, Stefano B. [email protected]
mex23
3
I’d like to add that you may need to encode the parameter
:with => “‘myparam=’+encodeURIComponent($F(‘form_field_id’))
+’¶m2=’+encodeURIComponent($F(‘form_field_id’))”
mex23
4
On Jun 2, 5:12 am, rubynuby [email protected] wrote:
I’d like to add that you may need to encode the parameter
:with => “‘myparam=’+encodeURIComponent($F(‘form_field_id’))
+‘¶m2=’+encodeURIComponent($F(‘form_field_id’))”
You should indeed be doing that. There’s some other ways of doing
this, I wrote about it over at
Fred
mex23
5
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Monday 02 June 2008 09:02:15 Frederick C. wrote:
I wrote about [link_to_remote :with] over at
That’s the best treatment of the subject I’ve ever seen!
Thanks,
Sheldon.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFIQ+EepGJX8XSgas0RAg49AJ97nRSPPAHCEUD56Hya8G6EmrBoIQCgkKtT
F5hIUF1RdF2Cst30jyuQ/Jo=
=kmsd
-----END PGP SIGNATURE-----