Welcome Guest, Not a member yet? Register   Sign In
ajax update not working
#5

[eluser]bobbob[/eluser]
Changed to your sugestion:
Code:
function init(){
    
     Event.observe('button', 'submit', updateit, false);
}

Still it opens a new page with the response.

This is my controller:
Code:
function preferred()
    {
        $this->load->helper(array('form', 'url'));
        $newdata = $_POST['preferred'];
        
        $id = $this->session->userdata('uid');
        $this->db->where('id',$id);
        
        $this->db->update('members', $_POST);
        
        $this->session->set_userdata('preferred',$newdata);
        
        echo $newdata;
        
    }

These three are in the <head> of the view inside script tags that i removed as the forum removes those tags:

Code:
type="text/javascript" src="<?= base_url();?>js/prototype.js">
    type="text/javascript" src="<?= base_url();?>js/scriptaculous.js">
  
     type="text/javascript" src="<?= base_url();?>js/ajax.js">
ajax.js being the javascript I posted earlier. They all show up in the source code and I put some other prototype effects on my page to prove to myself that the libraries are loaded.

Can't think of any more hints.
Thanks for trying Nick and waldmeister.


Messages In This Thread
ajax update not working - by El Forum - 02-06-2009, 01:03 AM
ajax update not working - by El Forum - 02-06-2009, 02:35 AM
ajax update not working - by El Forum - 02-06-2009, 10:44 AM
ajax update not working - by El Forum - 02-06-2009, 11:10 AM
ajax update not working - by El Forum - 02-06-2009, 12:27 PM
ajax update not working - by El Forum - 02-06-2009, 01:05 PM
ajax update not working - by El Forum - 02-06-2009, 02:21 PM
ajax update not working - by El Forum - 02-06-2009, 02:34 PM
ajax update not working - by El Forum - 02-06-2009, 02:46 PM
ajax update not working - by El Forum - 04-20-2011, 08:40 AM



Theme © iAndrew 2016 - Forum software by © MyBB