Help required about Drop Down Jquery

Messages
92
Reaction score
1
Points
8
I am at the last point of finishing my chart script and I stucked again. Last time lemon-tree and misson helped me lot to Finnish the chart script I really appreciate them help. Now I can provide entired world stock market's candle stick chart from my website but the jquery :( . Actually I want on keyup stockname will show a drop down suggestions including stock name and on click the stock name will be automatically fulfilled and there are another input box contains id stockcode will be auto filled by the particular stock code. the drop down lookup will like apple suggetion menu (I posted the script on x10's tutorial forum). In here I am able to generate the drop down but failed to auto fill on click. The suggestion.php contain dom like below
PHP:
<p id="searchresults">
<a href="#"><img src="imagefolder/companyicon.jpeg" alt="" /><span class="searchheading">Company Name</span><span>Stock Code on particular exchane </span></a><li id="stockcode"/><div id="stockname"/>
</p>

I have not written much to generate the suggestion menu just this
PHP:
function lookup(inputString) {

	if(inputString.length == 0) {

		$('#suggestions').fadeOut(); // Hide the suggestions box

	} else {


//exchange contains exchange name and tyepo stock type ex eq, db, inputstring the keyup data which //is typed by user
		$.post("data.php", {stExchange: $('#exchange').val(),stTypeo: $('#typeo').val(),queryString: $('#inputString').val()}, function(data) { // Do an AJAX call

			$('#suggestions').fadeIn(); // Show the suggestions box

			$('#suggestions').html(data); // Fill the suggestions box

		});

	}

}
and I tried this for auto fill
PHP:
(function() {

$('#searchresults').onclick(function(){

var stockid=($('li').get());

var stockname=($("div").get());

$("#stockname").load(country);

$("#stockcodecode").load(countryid);

});

});

So, Can any one help me with this please I had to release the chart on mywebsite by vday but failed to do so. So, trying to complete it ASAP because after that I have to setup all sql data.
Thanks
 
Last edited:
Top