• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Ajax Updater should work on js function call... But it dont...

#1
[eluser]Rubiz'[/eluser]
Hi!! I'm trying to do a Ajax Updater function outside button click; I had to do this in a normal javascript function, I'm trying like that:

Code:
<!--
    function setAdress()
    {
        var adress = '<?=base_url()?>index.php/email/preview/' + $('id_category').getValue();
        new Ajax.Updater('preview', adress ,{evalScripts:true});
    }
-->

It should work, don't?
Its not working... anyone knows why?

#2
[eluser]wiredesignz[/eluser]
This won't help your current problem, but base_url() is really for asset linking, site_url() is for application links. If index.php is ever renamed by someone using your code it will fail here.

#3
[eluser]Rubiz'[/eluser]
Your suggestion is really cool wired, thanx!
I discovered it have to be set a method... I set method:'post' and now it works very well Big Grin


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.