PDA

View Full Version : document.write to current window, not a new isntance


bacterozoid
10-26-2002, 12:45 AM
I have a search script on my *unfinished* site: http://www21.brinkster.com/jonshtmlhelp/

When you submit your query, a window pops up. This is all fine and dandy, but is there a way to get this to write into the current window, without it interrupting what is already there? I know using the document.write would simply write a whole new page basically, but is there a way I can specify where I want my results to write to, or better yet, clear some text already there and replace it with the search results? Thank's if you can help me out, even if you just point out that something is not possible.

boggly
10-26-2002, 01:19 AM
Yes, but it will only work for browsers that are version 4 or higher. The property that you're probably going to want to use is called .innerHTML.

-boggly

bacterozoid
10-26-2002, 02:31 AM
Well, thanks a bunch! I've done a bit of research and testing on innerHTML, and as a result have broadened my horizons on that topic as well as relating ones, and am about to put it to the test with my script.

boggly
10-26-2002, 05:22 PM
Good luck. If you need any additional help on a specific aspect, let me know, and I'll try to help.

-boggly