Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Jorge Arzuaga on Sep 22, 2008 14:40
open dhtmlx forum
DhtmlxCombo show with AJAX

Hi... i need show the combo but generated by Ajax in another page PHP, all is OK, mi code is:
<script type="text/javascript">
var ComboObj_nueva_cabeza_id2 = new dhtmlXCombo("ComboObj_nueva_cabeza_id2","nueva_cabeza_id2","246",true,2);
ComboObj_nueva_cabeza_id2.enableFilteringMode(true,"../../js/php/complete.php",true,true);        
ComboObj_nueva_cabeza_id2.setComboValue("50");
ComboObj_nueva_cabeza_id2.setComboText("JENNIFER ANDREA FRANCO PAZ");
ComboObj_nueva_cabeza_id2.filterSelf();
</script>


Is generated well, but not show the combo, the JavaScript is OK not show error, if i copy the source code generated by ajax in paste in a new page html show the combo..??

What is my error?

Thanks for all..:!
Answer posted by dhtmlx support on Sep 23, 2008 05:55
The code is correct.
Please, check if all necessary js and css files are included. 

If problem persists, please, provide a sample where it can be recreated.
Answer posted on Sep 23, 2008 09:33
Attach two files del_terceros.html here call my function AJAX and the file generated by that is show_nucleo.html...
 
The path is 
localhost/carpeta/modules/informes/del_terceros.html
localhost/carpeta/js/php/show_nucleo.html
If i show show_nucleo.html the combos are show me without problem, but called from del_terceros.html showme all fine but without combos... what is my error??
Thanks..!
Attachments (2)
Answer posted by dhtmlx support on Sep 25, 2008 08:33
The reason for the issue is that you get html and scripts via Ajax and add them as innerHTML. Scripts are not executed.

So you can get the <script> content which you have got and then execute it by execScript or eval method.

Or you can pass via Ajax only html and carry out script on del_terceros.html page