[Proto-Scripty] is there any problem with RegExp??
Hi all, my problem is that i use RegExp in javascript in order to refresh one combobox from an input, something like this: exreg= new RegExp(my_vay,i); array[sub]['ITEM'].search(exreg)==0 etc, etc, and it works, but when i add prototype library script type=text/javascript src=js/prototype.js/script now it doesnt work, and the error is on line array[sub]['ITEM'].search(exreg)==0 that is undefinded, i was cheking prototype.js and i founded something like this RegExp.prototype.match = RegExp.prototype.test; and other lines with RegExp, my question is: is there any problem usign RegExp on javascript and prototype library?? thanks in advance 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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: is there any problem with RegExp??
ok, here is my code of my function on javascript only, i dont know if its causing some conflict function filtr2(){ gr=document.pedido.elements['tipo_final']; grval=gr.options[gr.selectedIndex].value; gr2=document.pedido.elements['marca_final']; grval2=gr2.options[gr2.selectedIndex].value; pto=document.pedido.elements['producto2']; ftomod=document.pedido.elements['filtromodelo_final'].value; pto.innerHTML=''; //sel=document.getElementById(tipodeobr); //ped_tp=sel.options[sel.selectedIndex].value; opN=0; for (sub in productos_array2){ if(grval2=='Todos'){ filtro2=1; } else{ if (productos_array2[sub]['DMARCA']==grval2){ filtro2=1; } else{ filtro2=0; } }//fin union filtros if ((productos_array2[sub]['ITGR']==grval filtro2==1) || (grval=='Todos' filtro2==1)){ if (ftomod!='' ){ exreg= new RegExp(ftomod,i); //regular expresion, i ignore the case of characters exreg2= new RegExp(ftomod.replace(/-/g,).replace(/,),i); // regular expresion, g-global search, i-ignore case !--if (productos_array2[sub]['ITNO'].search(exreg)==0 || productos_array2[sub]['ITNO'].replace(/-/g,).replace(/,).search (exreg2)==0)-- if(productos_array2[sub]['ITNO'].search(exreg)==0) { var newOption = document.createElement(OPTION); newOption.text= productos_array2[sub]['ITNO'].replace(/ / g,)+' - '+productos_array2[sub]['FUDS']; newOption.value= productos_array2[sub]['ITNO']; pto.add(newOption); } } else{ var newOption = document.createElement(OPTION); newOption.text= productos_array2[sub]['ITNO'].replace(/ / g,)+' - '+productos_array2[sub]['FUDS']; newOption.value= productos_array2[sub]['ITNO']; addOption(pto,opN++,newOption); } //else } } //for sortlist('proid2'); colocaimagen2(); } and productos_array2 is my array with all options that i used to fill the combobox thanks On 11 mar, 11:34, Tobie Langel tobie.lan...@gmail.com wrote: Short answer: No. For a longer answer to your particular problem, you'll have to provide more code. :) Best, Tobie --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Proto-Scripty] problem with prototype.js and xmlhttp.js
hi guys 1) i have one page that uses xmlhttp.js and i need to modified that application but i used prototype.js 2) i add the line of prototype source like this, script type=text/javascript src=js/xmlhttp.js/script . . script type=text/javascript src=js/prototype.js/script 3) when i check some functionality of the developments that were made with js/xmlhttp.js now it doesnt work anymore 4) some of you know about a problem with compatibility between prototype.js and xmlhttp.js?? and how can i solve that problem? 5) i cannot modify or erase the developments in xmlhttp.js, you know, superior instructions :( thanks for your help 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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: div inside select/select tags?
i think that your problem is in this line select id=box2 onchange=ajaxUpdater('ajax_day', '/ajax/ populate.php?show=daymonth=' + getsel('box2') div id='ajax_regions'/div /select as far as i know you cannot use a div inside a select, check this link for help http://mmonreal.wordpress.com/2007/11/ On 4 feb, 00:16, T.J. Crowder t...@crowdersoftware.com wrote: Hi Richie, Now, select id=box2 onchange=ajaxUpdater('ajax_day', '/ajax/ populate.php?show=daymonth=' + getsel('box2') div id='ajax_regions'/div /select , doesn't work... That's because it's invalid HTML. You can't put divs inside select elements. I'm pretty sure only option and optgroup are allowed, but in any case I'm certain div isn't. You can use the W3C Markup Validator[1] to keep your HTML valid. [1]http://validator.w3.org With your updated example of the select box within the div and replaced via an Ajax.Updater: Using innerHTML to create form elements doesn't work reliably, and under the covers Ajax.Updater uses Element#update, which uses innerHTML. Separate from your specific problem of the event handler not being called (that could be easily solved using Event#observe), you'll run into issues with some browsers not recognizing the replaced select box at all. You pretty much have to add form elements using DOM methods (appendChild and the like). I take it the goal is to change the options available within the select box when the value changes? (OT: Doesn't that make for a jittery user experience?) Rather than using HTML, I think you're better off manipulating the options array of the select box directly. It's been years since I did that, so I'm sure what I used to do is old- fashioned -- I'll leave it to you to Google changing the options, or for someone who's done it more recently to chime in. So, not a complete answer, but hopefully it's useful to know what's going wrong... HTH, -- T.J. Crowder tj / crowder software / com Independent Software Engineer, consulting services available On Feb 4, 12:41 am, Richie M i...@linuxbox.co.uk wrote: Hi, I have a form with three drop down select boxes in it. I'd like the second box to populate when an option is selected in the first, and for the third to populate when an option is selected from the second. In the first select box, I use onchange to call a php script: select id='box1' onchange=ajaxUpdater('ajax_regions', '/ajax/ populate.php?show=monthid=' + getsel('box1') optionsomething/option /select Now, select id=box2 onchange=ajaxUpdater('ajax_day', '/ajax/ populate.php?show=daymonth=' + getsel('box2') div id='ajax_regions'/div /select , doesn't work, so I'm forced to use: div id='ajax_regions' select id=box2 /select /div , and get my php code to output something like: select id='box2' onchange=ajaxUpdater('ajax_day', '/ajax/ populate.php?show=daymonth=' + getsel('box2') option1/option /select Unfortunately, the onchange in the second select box doesn't fire. Is this because it doesn't parse the javascript outputted by the php code? Is there a way around this? Or perhaps a solution to the div inside select problem? Thanks in advance!- Ocultar texto de la cita - - Mostrar texto de la cita - --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: help with autocompleter
thanks a lot, disccomp and lars, i didnt' know this $safe_id = mysql_real_escape_string($_REQUEST['id']); lars you said that when you want to use fulltext search keep in mind there's a ft_min_word_len config variable which defaults to 4 characters (so won't get any results when searching with 2 characters) this variable i think that is defined on prototype.js or scriptaculous.js? sorry, but this is my second program using prototype, i'm very new thanks in advance De: disccomp discc...@gmail.com Fecha: Fri, 30 Jan 2009 07:21:41 -0800 (PST) Local: Vie 30 ene 2009 09:21 Asunto: Re: help with autocompleter Responder | Responder al autor | Reenviar | Imprimir | Mensaje individual | Mostrar mensaje original | Informar de este mensaje | Buscar mensajes de este autor and i need On 30 ene, 09:42, Lars Schwarz lars.schw...@gmail.com wrote: if you specified paramName: value on the autocompleter call then on php side your variable will be $_POST['value']. simple pattern search would then work like: $searchTerm = mysql_real_escape_string($_POST['value']) . %; // add a wildcard and your query for example might look like select * from foobar where last_name like '$searchTerm' when you want to use fulltext search keep in mind there's a ft_min_word_len config variable which defaults to 4 characters (so won't get any results when searching with 2 characters) On Fri, Jan 30, 2009 at 4:21 PM, disccomp discc...@gmail.com wrote: and i need to get this value, like this $searchterm=$_REQUEST['id'];?? You should make it injections safe, for example if using PHP: $safe_id = mysql_real_escape_string($_REQUEST['id']); $query = SELECT last_name, first_name FROM people WHERE last_name='$safe_id' ; Checkouthttp://us.php.net/mysql_real_escape_string -- Lars Schwarz Heiligengeiststr. 26 26121 Oldenburg T 0441 36110338 M 0151 1727 8127 Wwww.bitrocker.com --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: help with autocompleter
thanks a lot for you replay disccomp, now it works, i think that i was correct, because i only change the libraries for that one that you put in the replay,my doubt is that in the past i was usig this libraries in order to implement dependent selects and it works perfectly, now i need to check my libraries, thanks again 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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: help with autocompleter
i was checking my example and i think that it doesn't work propertly, for instance, if i type p all options appears, like alve alvr .. per par por ... zer zae and must appear the options that start with p, isn't it? here is my code form name=tarifas method=post table cellspacing=0 cellpadding=0 border=0 tr td width=70 class=texto4cliente:/td td width=200 input type=text id=autocomplete name=autocomplete_parameter/ span id=indicator1 style=display: none img src=/images/spinner.gif alt=Working... / /span div id=autocomplete_choices class=autocomplete/div /td /tr /table script type=text/javascript new Ajax.Autocompleter(autocomplete, autocomplete_choices, li.php, { paramName: value, minChars: 2, indicator: 'indicator1' }) /script /form eulerss On 29 ene, 09:27, eulerss eulers...@hotmail.com wrote: thanks a lot for you replay disccomp, now it works, i think that i was correct, because i only change the libraries for that one that you put in the replay,my doubt is that in the past i was usig this libraries in order to implement dependent selects and it works perfectly, now i need to check my libraries, thanks again 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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: help with autocompleter
hi Lars, for example if i want pulling data from a database, you said that something like this: or when pulling data from a database using something like WHERE field LIKE '$searchterm' $searchterm is what i type un the input?? and i need to get this value, like this $searchterm=$_REQUEST['id'];?? and in my function ajax.autocompleter, it doesnt change? script type=text/javascript new Ajax.Autocompleter(autocomplete, autocomplete_choices, li.php, { paramName: value, minChars: 2, indicator: 'indicator1' }) /script and finally if in my function with ajax, if I put minChars: 2, automatically when i type 2 characteres, the query on the database will run and return the result? thanks in advance On 29 ene, 10:11, Lars Schwarz lars.schw...@gmail.com wrote: you need to filter your result list (which was static in your last post) of course... something like: function autocomplete($needle,$haystack) { $html = 'ul class=autocomplete id=list'; foreach($haystack as $straw) { if($needle != '' stristr($straw, $needle)) { $html .= 'li class=autocomplete'.$straw.'/li'; } } $html .= '/ul'; echo $html; } or when pulling data from a database using something like WHERE field LIKE '$searchterm' hth: lars On Thu, Jan 29, 2009 at 5:08 PM, eulerss eulers...@hotmail.com wrote: i was checking my example and i think that it doesn't work propertly, for instance, if i type p all options appears, like alve alvr .. per par por ... zer zae and must appear the options that start with p, isn't it? here is my code form name=tarifas method=post table cellspacing=0 cellpadding=0 border=0 tr td width=70 class=texto4cliente:/td td width=200 input type=text id=autocomplete name=autocomplete_parameter/ span id=indicator1 style=display: none img src=/images/spinner.gif alt=Working... / /span div id=autocomplete_choices class=autocomplete/div /td /tr /table script type=text/javascript new Ajax.Autocompleter(autocomplete, autocomplete_choices, li.php, { paramName: value, minChars: 2, indicator: 'indicator1' }) /script /form eulerss On 29 ene, 09:27, eulerss eulers...@hotmail.com wrote: thanks a lot for you replay disccomp, now it works, i think that i was correct, because i only change the libraries for that one that you put in the replay,my doubt is that in the past i was usig this libraries in order to implement dependent selects and it works perfectly, now i need to check my libraries, thanks again eulerss -- Lars Schwarz Heiligengeiststr. 26 26121 Oldenburg T 0441 36110338 M 0151 1727 8127 Wwww.bitrocker.com- Ocultar texto de la cita - - Mostrar texto de la cita - --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: help with autocompleter
is there any body out there? :( On 23 ene, 10:34, eulerss eulers...@hotmail.com wrote: i have a problem :( this is my error: Stack overflow at line 1926 this error appears when i load for fist time the page,for example, if i type P, appears, but then, not any more, and the most important thing is that my autocomplete function is not working, here is my simple code that i take from the link that ColinFine gave me: html head meta http-equiv=Content-Type content=text/html; charset=windows-1252 title/title script type=text/javascript src=js/prototype.js/script script type=text/javascript src=js/scriptaculous.js/script body input type=text id=autocomplete name=autocomplete_parameter/ div id=autocomplete_choices/div script type=text/javascript new Ajax.Autocompleter(autocomplete, autocomplete_choices, ./ li.php, {}); /script /body /head /html i think that my code is correct, i have two id's, one of the input and other of the div element, and in the Ajax.Autocompleter i'm using this id's, and my file li.php that contains my list, this is the simple code of mi li.php file: ?php echo ul liPerkins Justin/li liPerkins Tim/li liPopulate/li liPersons/li liPeople/li liPost/li /ul; ? any ideas? thanks in advance eulerss On 23 ene, 09:26, eulerss eulers...@hotmail.com wrote: Thanks Colin, i'm reading the link, if i continue with problems, i'll post here eulerss On 23 ene, 04:34, ColinFine colin.f...@pace.com wrote: On Jan 22, 11:18 pm, eulerss eulers...@hotmail.com wrote: please help, i was seeing one example but i have some doubts 1) in the principal file script src=lib/prototype.js type=text/javascript/script script src=src/scriptaculous.js type=text/javascript/script script src=src/unittest.js type=text/javascript/script its necessary to add the unittest.js?? (sorry i repeated, im noob in this) No. I've never included it. 2) if i used, for instance response.php in order to get all values, whats the correct form? i mean, can i used response.php simple like this ?php echo div ul liA/li liB/li ul /div; ? Don't send the div, just the ul [1] 3)whats the form when i'm calling the funcion ajax.autocompleter? script type=text/javascript language=javascript new Ajax.Autocompleter('id','id','response.php'); No, you need to supply two different elements (or id's) - first the input field, and then the div in which it is to put the list. Please read [1] carefully. [1]:http://wiki.github.com/madrobby/scriptaculous/ajax-autocompleter, section 'Sever return'. Colin- Ocultar texto de la cita - - Mostrar texto de la cita -- Ocultar texto de la cita - - Mostrar texto de la cita - --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: help with autocompleter
Thanks Colin, i'm reading the link, if i continue with problems, i'll post here eulerss On 23 ene, 04:34, ColinFine colin.f...@pace.com wrote: On Jan 22, 11:18 pm, eulerss eulers...@hotmail.com wrote: please help, i was seeing one example but i have some doubts 1) in the principal file script src=lib/prototype.js type=text/javascript/script script src=src/scriptaculous.js type=text/javascript/script script src=src/unittest.js type=text/javascript/script its necessary to add the unittest.js?? (sorry i repeated, im noob in this) No. I've never included it. 2) if i used, for instance response.php in order to get all values, whats the correct form? i mean, can i used response.php simple like this ?php echo div ul liA/li liB/li ul /div; ? Don't send the div, just the ul [1] 3)whats the form when i'm calling the funcion ajax.autocompleter? script type=text/javascript language=javascript new Ajax.Autocompleter('id','id','response.php'); No, you need to supply two different elements (or id's) - first the input field, and then the div in which it is to put the list. Please read [1] carefully. [1]:http://wiki.github.com/madrobby/scriptaculous/ajax-autocompleter, section 'Sever return'. Colin --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: help with autocompleter
i have a problem :( this is my error: Stack overflow at line 1926 this error appears when i load for fist time the page,for example, if i type P, appears, but then, not any more, and the most important thing is that my autocomplete function is not working, here is my simple code that i take from the link that ColinFine gave me: html head meta http-equiv=Content-Type content=text/html; charset=windows-1252 title/title script type=text/javascript src=js/prototype.js/script script type=text/javascript src=js/scriptaculous.js/script body input type=text id=autocomplete name=autocomplete_parameter/ div id=autocomplete_choices/div script type=text/javascript new Ajax.Autocompleter(autocomplete, autocomplete_choices, ./ li.php, {}); /script /body /head /html i think that my code is correct, i have two id's, one of the input and other of the div element, and in the Ajax.Autocompleter i'm using this id's, and my file li.php that contains my list, this is the simple code of mi li.php file: ?php echo ul liPerkins Justin/li liPerkins Tim/li liPopulate/li liPersons/li liPeople/li liPost/li /ul; ? any ideas? thanks in advance eulerss On 23 ene, 09:26, eulerss eulers...@hotmail.com wrote: Thanks Colin, i'm reading the link, if i continue with problems, i'll post here eulerss On 23 ene, 04:34, ColinFine colin.f...@pace.com wrote: On Jan 22, 11:18 pm, eulerss eulers...@hotmail.com wrote: please help, i was seeing one example but i have some doubts 1) in the principal file script src=lib/prototype.js type=text/javascript/script script src=src/scriptaculous.js type=text/javascript/script script src=src/unittest.js type=text/javascript/script its necessary to add the unittest.js?? (sorry i repeated, im noob in this) No. I've never included it. 2) if i used, for instance response.php in order to get all values, whats the correct form? i mean, can i used response.php simple like this ?php echo div ul liA/li liB/li ul /div; ? Don't send the div, just the ul [1] 3)whats the form when i'm calling the funcion ajax.autocompleter? script type=text/javascript language=javascript new Ajax.Autocompleter('id','id','response.php'); No, you need to supply two different elements (or id's) - first the input field, and then the div in which it is to put the list. Please read [1] carefully. [1]:http://wiki.github.com/madrobby/scriptaculous/ajax-autocompleter, section 'Sever return'. Colin- Ocultar texto de la cita - - Mostrar texto de la cita - --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: help with autocompleter
yep, its not var as var, actually the name is different to var, i only use var as an example, alex can u help me with the autocompleter?, some ideas or one example, i was looking for a similar post with autocomplete function, but i dont understand to much, i need some for newies, thanks in advance On 22 ene, 01:26, Alex Mcauley webmas...@thecarmarketplace.com wrote: for a start i wouldnt use var as a var in this line var = transport.responseText; ... try var foo=transport.responseText; instead - Original Message - From: eulerss eulers...@hotmail.com To: Prototype script.aculo.us prototype-scriptaculous@googlegroups.com Sent: Wednesday, January 21, 2009 6:31 PM Subject: [Proto-Scripty] help with autocompleter 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=value1var2=value2, etc etc new Ajax.Request( url, { method: 'get', asynchronous: false, onSuccess: function(transport) { var = transport.responseText; } }); document.getElementById('id').innerHTML = 'select optionSelect/option' + var +'/select'; /script eulerss- Ocultar texto de la cita - - Mostrar texto de la cita - --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Proto-Scripty] Re: help with autocompleter
please help, i was seeing one example but i have some doubts 1) in the principal file script src=lib/prototype.js type=text/javascript/script script src=src/scriptaculous.js type=text/javascript/script script src=src/unittest.js type=text/javascript/script its necessary to add the unittest.js?? (sorry i repeated, im noob in this) 2) if i used, for instance response.php in order to get all values, whats the correct form? i mean, can i used response.php simple like this ?php echo div ul liA/li liB/li ul /div; ? 3)whats the form when i'm calling the funcion ajax.autocompleter? script type=text/javascript language=javascript new Ajax.Autocompleter('id','id','response.php'); /script i'm correct? please tell me if i'm wrong in something, thanks in advance --~--~-~--~~~---~--~~ 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 -~--~~~~--~~--~--~---
[Proto-Scripty] help with autocompleter
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=value1var2=value2, etc etc new Ajax.Request( url, { method: 'get', asynchronous: false, onSuccess: function(transport) { var = transport.responseText; } }); document.getElementById('id').innerHTML = 'select optionSelect/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 -~--~~~~--~~--~--~---