Field observer parameters

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

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]

I’d like to add that you may need to encode the parameter

:with => “‘myparam=’+encodeURIComponent($F(‘form_field_id’))
+’&param2=’+encodeURIComponent($F(‘form_field_id’))”

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’))
+‘&param2=’+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

-----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-----

Many thanks guys!