hi guys, i want to implement the autocomplete function with ajax, im
very new using prototype (i only know how to do dependent selects),
can you tell me some ideas? actually i have de database in mysql and i
want to use php for this, thanks in advance for your help

here is the simple code that i only know for selects:

<script type="text/javascript">
        function OnChangeOrg() {
                                                                                
some vars definitions ...
                                                                                
var url = './file.php?var1=value1&var2=value2, etc
etc
        new Ajax.Request(
        url,
        {
                                                                                
        method: 'get',
                                                                                
        asynchronous: false,
                                                                                
        onSuccess: function(transport) {
                                                                                
        var = transport.responseText;
                                                                                
                                                                                
        }
                                                                                
        });

                                                                                
document.getElementById('id').innerHTML = '<select
><option>Select</option>' + var +'</select>';
</script>


eulerss

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com
To unsubscribe from this group, send email to 
prototype-scriptaculous+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to