By: Anonymous: john () Aug 10 2009 08:28 am (Read 3106 times)
I can explain what I need to do, I want to show in a select option all records form a table (Institutions) and when I select one item (institution) it should fill another select option with the (departments) related with the institution selected.
I already have the code for that, I tested and it working outside de the glFusion, but when I try to put the code inside the static page it don´t work, and sometimes I guess the glFusion modified some lines....
3. You are using a body onload statement, again, glFusion has already put a <body> statement on the page. Static pages are considered the 'content' of the page, it is wrapped by glFusion's header / footer. Maybe using something like this:
4. I would not recommend using a form action that calls the static page index.php. Instead, I would write a separate .php file that handles the form's submit and then do a echo COM_refresh('url goes here'; when done.
Let me know if this helps get you a little further along....
If you can provide all the files I'll do a little testing later this morning. A couple of other thoughts:
- glFusion uses the MooTools library, could it be there is a conflict between it an your scripts?
- Do you have any JS debugging tools (I use FireFox with the FireBug extension) to see if there are any errors that might give a clue?
I know it´s not a good way to do, but when I put these code:
PHP Formatted Code
The function "buscaInstituicoes()" executes and fills the first select, the problem is when I select some item, did not fills the second one... it´s strange, it seems like the call "onchange" doesn´t work