cakephp - passing argument to ajax call from view -


In my application, I have to give an argument to the controller via AJAX call on the text box key. By accumulating your vocal, but I need to have a funnel through and need AJAX.

You can do something like this, if you are using prototype:

< Pre> & lt; Input type = "text" id = "element_to_observe" & gt; & Lt; Script type = "text / javascript" & gt; Event.boserv ($ ('element_to_source'), 'key', function (event) {var element = Event.element (new) Ajax request ('/ control name / verb' 'element.value, / Your logic Asynchronous: True, success on: doSomething, // execution after executing your work evalScripts: true});}); Function doSomething (feedback) {} & lt; / Script & gt;

Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -