What does work in Netscape? Seriously, the document.write function will only "work" if it is executed during the inital phase of page display. So if your function is called from "in-line" script that executes as the page is rendering, it should work. If your function is called after the page has been loaded, it will have no effect on the displayed page whatsoever. hth, bear
i call it in a form with an onclick. i stick onCLick in a button i press the button in ie i get the output i press the button in netscape i get nothing
Thanks Charlie that worked.... but I didn't want to go into this but now I have a new problem. The reason why I am doing is to clear the screen. The users will have two choices say do this or do that..... Each calls a seperate servlet. While the request is going to the servlet and then being processed I want to clear the screen so they don't start pressing buttons. When I use document.write() then document.close() the request does not come back to the window. What is coming back to the window is a jsp page with info on it. Is there any other way I can do what I am trying to do?
Sounds like you have created a race condition that could have unpredictable results. On one hand you are trying to write to the document and on the other you are submitting a servlet that is sending a response (I'm assuming that the resulting JSP is the result of forwarding by your servlets). One suggestion (if I understand what you are trying to do correctly) might be to have your buttons not directly submit to the servlets, but rather to your "blank" page with enough information so that it can submit to the servlet of choice. In this way you have a clear, serial path: your form submits to the blank page, which submits to the servlet, which replaces the blank page when done. hth, bear
If for instance you are submitting a form,then build the html document in a string then write it. document.write(string); document.close(); now when the string/html is rendered and the on load event from body will trigger the submit form and you have a blank page with a single submit. I am not running the code but just putting something down so you get the idea.This is the form of the submit function
Don't forget in NS4 you can always do a document.write() on a layer / div
I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
well ain't you the lucky one. Some of us don't have that luxury. At least I'm not supporting NS3
I have seen things you people would not believe, attack ships on fire off the shoulder of Orion, c-beams sparkling in the dark near the Tennhauser Gate. All these moments will be lost in time, like tears in the rain.
So there I was, trapped in the jungle. And at the last minute, I was saved by this tiny ad:
Free, earth friendly heat - from the CodeRanch trailboss