Hi i am not to good in javascript. This is a part of code from my ajax search auto-suggest and i need to replace "the word" with the input id somehow and i dont know how to do it. need some help please. here is a link to the entire code demo. http://jsfiddle.net/coladeu/Qhj5N/ <input type="text" id="[B]selectedInput[/B]"/><ul id="list"></ul> <script> [B]var keyword = "the word[/B][B]"; [/B] (wrong code) url: "http://itunes.apple.com/search?term="[B] + keyword +[/B] "&entity=musicTrack", .. Code (markup):
look there is a text box with id="selectedInput" now what u have to do is make a variable like this in java script and stored that id which is in text box. var x=document.getElementbyId("selectedInput").value; using this variable you can store the text box value in var x and then u can use it where u need this variable.