I want to make an Ajax call using remoteLink (with Prototype as the Javascript library) but I need one of the parameters being passed to be the value from a textfield. Here's what I have so far in my GSP:
<input id="email" name="email" type="text"/>
...
<g:remoteLink action="addEmail" params="[email:???]">Add</g:remoteLink>
What do I put in place of ??? to get the remoteLink to send the value of the email textfield as a parameter? Essentially, how do I reference/access the DOM within a Grails tag?
I tried putting
\$('email').value
in place of ??? but I got a "Could not parse script" error in my GSP.
Thanks