Hello everybody,

I tried for a couple of days to get my form serialized before posting
it as an AJAX-request. This is my code:

                                        <form action="" method="post" 
name="theform" id="theform">
                                                <input type="checkbox" 
name="chkbox" value="1">
                                                <p>
                                                        <label for="alt_search" 
class="left">Search for:</label>
                                                        <input id="searchText" 
name="livesearch" class="field" />
                                                        <script>
                                                                new 
Form.Element.Observer('searchText', 1,
                                                                
function(element, value)
                                                                {
                                                                        new 
Ajax.Updater('search_results', 'livesearch.php',
                                                                        {
                                                                                
asynchronous:true,
                                                                                
evalScripts:true,
                                                                                
onComplete:function(request)
                                                                                
{Element.hide('search_spinner')},
                                                                                
onLoading:function(request)
                                                                                
{Element.show('search_spinner')},
                                                                                
method:'post', parameters:'livesearch=' + value
                                                                        })
                                                                })
                                                        </script>
                                                </p>
                                        </form>

I´d like to get the chkbox-value (and possibly others) sent to the
livesearch.php-script as well, as soon as anything in the form changes
- and after submiting the form, of course, it´d be nessecary to be
able to access the "whole form-content". Any idea, anybody?

Thanks for your help!

Christoph


--~--~---------~--~----~------------~-------~--~----~
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 [email protected]
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