Welcome Guest, Not a member yet? Register   Sign In
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




Theme © iAndrew 2016 - Forum software by © MyBB