Menu

Dynamic html content + document.write()

Anonymous
2003-02-01
2003-02-12
  • Anonymous

    Anonymous - 2003-02-01

    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 :-)

     
    • Russell Gold

      Russell Gold - 2003-02-02

      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?

       
    • Anonymous

      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?

       
      • Russell Gold

        Russell Gold - 2003-02-12

        Probably - anything relying on an unsupported feature is not going to work :)

        Is this an IE-specific feature?

         

Log in to post a comment.

Auth0 Logo