[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> </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 "JavaScript: document.write() should have an affect \
(by implicit postponed call to close())."</DIV> <DIV> </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> </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'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... </div> <div>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: </div><div><div><font \
class="Apple-style-span" face="'courier new', monospace">[HTMLDocument] DEBUG \
write: <html><head></head><body><form name='form0' \
method='post' action='<a \
href="https://myurl.com/login.htm?task=task">https://myurl.com/login.htm?task=task</a>'></font></div>
<div><font class="Apple-style-span" face="'courier new', \
monospace"><input type=hidden> \
</input></form></body></html></font></div><div><font \
class="Apple-style-span" face="'courier new', 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't "reach" \
the page. I've debugged to the HTMLDocument class and I've found \
this:</font></div> <div><div>line: 435</div><div>// If open() was called; don't \
write to doc yet -- wait for call to close().</div><div> if \
(!writeInCurrentDocument_) {</div><div> LOG.debug("wrote content to \
buffer");</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 "<font class="Apple-style-span" \
face="'courier new', monospace">447: \
page.writeInParsedStream(bufferedContent.toString());</font>" 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