Autocomplete and Dynamic Parameter Passing
- by abcParsing
The code below works fine using jQuery UI 1.8 and jQuery 1.4.2
$("#sid_entry_box").autocomplete( {source:"autocomplete_sid.php?database="+database_name,
minLength:4,
delay:1000,
enable:true, cacheLength:1
});
The database name is passed as a get parameter of the php call.
In this application, I have two databases selected by a radio button.
Since jQuery loads and assigns this function when the document is loaded, the database name is whatever was checked at that momemnt.
What I really need to pass to the php call is the following:
database=$("input[name=rf_database_option]:checked").val();
Is ther ean easy to understand way to be able to pass a dynamic dom value?