John Mathew
John Mathew

Reputation: 405

how to pass additional argument to php file in autocomplete

i just want to pass arguments to php in autocomplete.code is following

$(function(){
        $( "#txt_supplier_account_name" ).autocomplete(
        {
           source:'./modules/stock/ajax/ajax.commonsearch.php',
           select: function(event, ui) {
        }
   })
});

Upvotes: 0

Views: 141

Answers (2)

I'm Geeker
I'm Geeker

Reputation: 4637

Try this

$( "#txt_supplier_account_name" ).autocomplete(
    {
       source:'./modules/stock/ajax/ajax.commonsearch.php?key1=value1&key2=value2',
       select: function(event, ui) {
    }
});

Upvotes: 1

GautamD31
GautamD31

Reputation: 28763

Through the source url you can send like

$( "#txt_supplier_account_name" ).autocomplete(
    {
       source:'./modules/stock/ajax/ajax.commonsearch.php?key1='+value1+'&key2='+value2,
       select: function(event, ui) {
    }
});

And in the ajax.commonsearch.php you can GET then through the url.

Upvotes: 1

Related Questions