Welcome Guest, Not a member yet? Register   Sign In
How to call CI Model function from jQuery eventhandler?
#1

[eluser]JoostV[/eluser]
Hi there,

How can I make a jQuery eventhandler call a function from a CI Model?

I would like to call the following function automatically when a user closes the browser window. (the functions saves the user's moderations)
Code:
$this->articles->save($id);

jQuery $(window).unload seems to be the perfect eventhandler for this task.
Code:
$(window).unload( function () { /*Do_Stuff*/ } );

But how do I make this event call my CI Model function?


Messages In This Thread
How to call CI Model function from jQuery eventhandler? - by El Forum - 06-10-2008, 01:19 AM
How to call CI Model function from jQuery eventhandler? - by El Forum - 06-10-2008, 01:37 AM
How to call CI Model function from jQuery eventhandler? - by El Forum - 06-10-2008, 01:51 AM
How to call CI Model function from jQuery eventhandler? - by El Forum - 06-10-2008, 02:57 AM
How to call CI Model function from jQuery eventhandler? - by El Forum - 06-10-2008, 03:53 AM
How to call CI Model function from jQuery eventhandler? - by El Forum - 06-13-2008, 09:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB