On Jan 31, 9:05 pm, Stripe-man <[EMAIL PROTECTED]> wrote:
> oh... ok!!  I will try that as well...
>
> BTW... Rob  (or anyone)
>
> if i change my field name to:  delete_names_array to delete_names_array[]
> how can i properly change this
>
> THIS WORKS=>    formele = eval(document."+ form + id ".delete_names_array" +
> id + '[]');

As I said, you will get better javascript support at clj - the answer
to your question is on that news group's FAQ:

<URL: http://www.jibbering.com/faq/#FAQ4_25 >

You should assume that any use of eval is totally unwarranted - the
cases where its use is appropriate are few and far between.

If you are trying to serialise a form's content, then use one of the
many form serialisation functions that have already been written.
Prototype.js has one, but there are others.   AjaxToolbox has a good
one:

<URL: http://www.ajaxtoolbox.com/request/
documentation.php#serializeForm >


Finally, your form controls should be using names, not ids and you
should be basing your logic on their value, not using the ID as a
pseudo-value.  That way you just serialise the form and send it, most
servers will be (more or less) oblivious to how the request was sent
and will handle standards-compliant requests automatically.

That way, if scripting is not supported or disabled, your form submits
and gets the job done the old way.  If scripting is available, you use
AJAX and provide a bit of convenience for the user.


--
Rob


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

Reply via email to