i have a code like this but it's not working: i want to go the search page with the search term entered to textbox without using form.. how can i use this.. (i have a website with frames that's why i wrote like "top.main") i know it is simple but i am missing something.. :/
You need to put id="search_term" in your text input as well since you're using document.getElementById on it.
i tried but.. still, it is not working.. there is a problem with the code.. i am not sure if it is true or not.. how can i read the value of that text box?? are there any other ways to do this?
<input type="text" name="search_term" id="search_term"> <input type="button" onclick="top.main.location.href='search.php?x='+escape(document.getElementById('search_term').value)"> HTML: