Iam using auto Complete method and spilliting the label and value
$("#txt1").autocomplete({
minLength: 1,
source: "/abc/ajax.php?param1=''¶m2="+$("#txt1").attr("value"),
select: function(event, ui)
{
var label= ui.item.label;
var value= ui.item.value;
var Arr = label.split('-');
$('#txt2').val( Arr[1].replace('$$$','') );
}
});
In the above code iam getting the name and value from server side script (PHP).Here i have Three thing to do
1)How do I replace the “$$$” in the label with a ” ” ( Suppose say i may have “($$)” and some time i may have “($)”
how do i find the “$” constant in the label and replace with a ” “(space)
2)How do i decrease the Font Size of the list of autocomplete Values that are displayed.
3) How do i apply color to the auto complete field .Iam dispalying the autocomplete in such way “NAME-Value”.
I want to apply different color for name and value
How to replace the “$$$”:
I haven’t used JQuery’s autocomplete plugin, but CSS is probably the way to go. Use a tool that lets you inspect the HTML from in the browers, to discover what CSS selctors to use.
Color would be similar: