[prev in list] [next in list] [prev in thread] [next in thread] 

List:       htmlunit-user
Subject:    Re: [Htmlunit-user] Problem with HtmlDocument.write()
From:       Ahmed Ashour <asashour () yahoo ! com>
Date:       2009-12-23 12:57:40
Message-ID: 350432.24062.qm () web112201 ! mail ! gq1 ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi Tamas,

* You must subscribe to the list before posting.
* I believe this has already been fixed, please get latest snapshot from \
http://build.canoo.com/htmlunit/artifacts which contains a fix for  "JavaScript: \
document.write() should have an affect (by implicit postponed call to close())."

Enjoy,
Ahmed----
Blog: http://asashour.blogspot.com 
 
----- Forwarded Message ----



      


[Attachment #5 (text/html)]

<html><head><style type="text/css"><!-- DIV {margin:0px;} \
--></style></head><body><div style="font-family:times new roman, new york, times, \
serif;font-size:12pt"><DIV></DIV> <DIV>Hi Tamas,</DIV>
<DIV>&nbsp;</DIV>
<DIV>* You must subscribe to the list before posting.</DIV>
<DIV>* I believe this has already been fixed, please get latest snapshot from <A \
href="http://build.canoo.com/htmlunit/artifacts">http://build.canoo.com/htmlunit/artifacts</A> \
which contains a fix for &nbsp;"JavaScript: document.write() should have an affect \
(by implicit postponed call to close())."</DIV> <DIV>&nbsp;</DIV>
<DIV>Enjoy,</DIV>
<DIV>Ahmed</DIV>----<BR>Blog: <A \
href="http://asashour.blogspot.com">http://asashour.blogspot.com</A> <DIV><FONT \
size=2 face=Tahoma></FONT>&nbsp;</DIV> <DIV><FONT size=2 face=Tahoma>----- Forwarded \
Message ----<BR></DIV></FONT><!-- cg25.c4.mail.gq1.yahoo.com compressed/chunked Tue \
Dec 22 23:45:54 PST 2009 --></div><br>



      </body></html>
--0-2070456181-1261573060=:24062--


[Attachment #6 (message/rfc822)]



Hi all,

I hope someone can help me. I've received a 'Cannot call method "submit" of
undefined' TypeError because of my javascript. It opens a new window and
injects a html source in it (contains a form) and submits this form...
During the debugging I've realised (thanks to js alerts :) ) that the
HTMLUnit sees the new window, but not the injected source (the
body.innerHTML is empty).. and in the console it writes:
[HTMLDocument] DEBUG write: <html><head></head><body><form name='form0'
method='post' action='https://myurl.com/login.htm?task=task'>
<input type=hidden> </input></form></body></html>
[HTMLDocument] DEBUG wrote content to buffer
so the write method runs, but it didn't "reach" the page. I've debugged to
the HTMLDocument class and I've found this:
line: 435
// If open() was called; don't write to doc yet -- wait for call to close().
        if (!writeInCurrentDocument_) {
            LOG.debug("wrote content to buffer");
            return;
        }

Does anyone know, what kind of close method does it wait for? And when will
the required "447: page.writeInParsedStream(bufferedContent.toString());"
line run? I use HtmlUnit v2.6

Thanks for your help,

Cheers and Merry Christmas!!!

[Attachment #9 (text/html)]

Hi all,<div><br></div><div>I hope someone can help me. I&#39;ve received a \
&#39;Cannot call method &quot;submit&quot; of undefined&#39; TypeError because of my \
javascript. It opens a new window and injects a html source in it (contains a form) \
and submits this form... </div> <div>During the debugging I&#39;ve realised (thanks \
to js alerts :) ) that the HTMLUnit sees the new window, but not the injected source \
(the body.innerHTML is empty).. and in the console it writes: </div><div><div><font \
class="Apple-style-span" face="&#39;courier new&#39;, monospace">[HTMLDocument] DEBUG \
write: &lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;&lt;form name=&#39;form0&#39; \
method=&#39;post&#39; action=&#39;<a \
href="https://myurl.com/login.htm?task=task">https://myurl.com/login.htm?task=task</a>&#39;&gt;</font></div>
 <div><font class="Apple-style-span" face="&#39;courier new&#39;, \
monospace">&lt;input type=hidden&gt; \
&lt;/input&gt;&lt;/form&gt;&lt;/body&gt;&lt;/html&gt;</font></div><div><font \
class="Apple-style-span" face="&#39;courier new&#39;, monospace">[HTMLDocument] DEBUG \
wrote content to buffer</font></div> <div><font class="Apple-style-span" face="arial, \
helvetica, sans-serif">so the write method runs, but it didn&#39;t &quot;reach&quot; \
the page. I&#39;ve debugged to the HTMLDocument class and I&#39;ve found \
this:</font></div> <div><div>line: 435</div><div>// If open() was called; don&#39;t \
write to doc yet -- wait for call to close().</div><div>        if \
(!writeInCurrentDocument_) {</div><div>            LOG.debug(&quot;wrote content to \
buffer&quot;);</div> <div>            return;</div><div>        \
}</div><div><br></div><div>Does anyone know, what kind of close method does it wait \
for? And when will the required &quot;<font class="Apple-style-span" \
face="&#39;courier new&#39;, monospace">447: \
page.writeInParsedStream(bufferedContent.toString());</font>&quot; line run? I use \
HtmlUnit v2.6</div> <div><br></div><div>Thanks for your \
help,</div><div><br></div><div>Cheers and Merry Christmas!!!</div></div></div>



------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 

_______________________________________________
Htmlunit-user mailing list
Htmlunit-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/htmlunit-user


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic