I am trying to test an html page that has dynamic html being inserted via document.write() during the onLoad event on the <body> tag. I thought the WebResponse would contain the entire html page, but it only contains the dynamic content written during the onLoad event. Is this the expected behaviour?
Thanks in advance!
Salut :-)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Doesn't sound right... I have never seen the case you describe. Usually document.write() is called in a script section, not in "onLoad" - what is the reason for putting it in the onLoad event? What happens in a browser?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2003-02-03
You are right, there is no document.write() in the function that is called by the "onLoad" event. Let's just say I was temporarily insane and leave it at that...
In fact, the function that is called by the "onLoad" is using Layers to show / hide parts of the page that have *already* been written to the page via document.write(). The only output I see in my WebResponse is the layer that is made visible during the "onLoad".
Since HttpUnit doesn't support layers (js.1.2), is this why my response is not what I expect?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am trying to test an html page that has dynamic html being inserted via document.write() during the onLoad event on the <body> tag. I thought the WebResponse would contain the entire html page, but it only contains the dynamic content written during the onLoad event. Is this the expected behaviour?
Thanks in advance!
Salut :-)
Doesn't sound right... I have never seen the case you describe. Usually document.write() is called in a script section, not in "onLoad" - what is the reason for putting it in the onLoad event? What happens in a browser?
You are right, there is no document.write() in the function that is called by the "onLoad" event. Let's just say I was temporarily insane and leave it at that...
In fact, the function that is called by the "onLoad" is using Layers to show / hide parts of the page that have *already* been written to the page via document.write(). The only output I see in my WebResponse is the layer that is made visible during the "onLoad".
Since HttpUnit doesn't support layers (js.1.2), is this why my response is not what I expect?
Probably - anything relying on an unsupported feature is not going to work :)
Is this an IE-specific feature?