I need to call my REST API that is written in PHP from a javascript script. A similar situation I can point to is the jquery ui autocomplete plugin. When you specify an external php script for the source attribute, it reads the output from the php script, and uses that as the autocomplete options.
you could use the jQuery ajax function: |
|||||
|
AJAX. That is all. If you have any more specific issues, feel free to ask. |
|||
|
You can use an AJAX request (if I understood the question) If your API is written in myapi.php, you can:
...assuming you're using jQuery, of course :) |
|||
|
$.ajax
,$.post
,$.get
– Saleh Aug 6 '12 at 21:29