Use AJAX to load webpage content into DIV
Posted
by arik-so
on Stack Overflow
See other posts from Stack Overflow
or by arik-so
Published on 2010-06-06T18:14:38Z
Indexed on
2010/06/06
18:22 UTC
Read the original article
Hit count: 385
Hello.
I have a text field. When I type something into than text field, I want to load stuff into the DIV below. That's my code equivalent:
<input type="text" onkeyup="/* I am not sure, how it's done, but I'll just write: */ document.getElementById('search_results').innerHTML = getContents('search.php?query='+this.value);" /><br/>
<div id="search_results"></div>
Hope you can help. Thanks in advance!
EDIT: I would appreciate it if the solution did not involve using jQuery - as long as it's possible.
© Stack Overflow or respective owner