From: nikola <web...@ya...> - 2005-03-11 09:37:45
|
hi, I get following errors, but sometimes it works fine here is part of html code that's causing problem: <table border="0" cellpadding="0" cellspacing="0" align="center"> <form name="html_form" action="/im_cms/site/dot_editor/edit_element.php?element_name=html_test&content_id=43&element_type=4&action=save" method="post"> <tr valign="top"> <td id="pocetak_containera"> <script language='JavaScript'> <!-- var spaw_active_toolbar = true; //--> </script> <script language="javascript"> <!-- setTimeout('document.getElementById("container").value ="New html text added\\n";',0); setTimeout('document.getElementById("container").value = document.getElementById("container").value.replace(/"/g,\'"\');',0); setTimeout('document.getElementById("container").value = document.getElementById("container").value.replace(/@@START_COMMENT/g,\'<!--\');',0); setTimeout('document.getElementById("container").value = document.getElementById("container").value.replace(/@@END_COMMENT/g,\'-->\');',0); setTimeout("SPAW_editorInit('container','/im_cms/site/html_editor/wysiwyg.css','ltr');",0); //--></script></td><td id="SPAW_container_toolbar_right_design" valign="top" class="SPAW_default_toolbar"></td><td id="SPAW_container_toolbar_right_html" valign="top" class="SPAW_default_toolbar" style="display : none;"></td></tr><tr><td class="SPAW_default_toolbar"></td><td id="SPAW_container_toolbar_bottom_design" class="SPAW_default_toolbar" width="100%"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td align="right" valign="top" class="SPAW_default_toolbar_bottom" nowrap="yes"><img id="SPAW_container_tb_design_tab_on" alt="" src="/im_cms/site/html_editor/lib/themes/default/img/tb_design_tab_on.gif" unselectable="on"><img id="SPAW_container_tb_html_tab" alt="Switch to HTML (code) mode" src="/im_cms/site/html_editor/lib/themes/default/img/tb_html_tab.gif" onClick="SPAW_html_tab_click('container',this)" class="SPAW_default_tb_out" onMouseOver="SPAW_default_bt_over(this)" onMouseOut="SPAW_default_bt_out(this)" onMouseDown="SPAW_default_bt_down(this)" onMouseUp="SPAW_default_bt_up(this)" unselectable="on"></td></tr></table></td><td id="SPAW_container_toolbar_bottom_html" class="SPAW_default_toolbar" width="100%" style="display : none;"><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td align="right" valign="top" class="SPAW_default_toolbar_bottom" nowrap="yes"><img id="SPAW_container_tb_design_tab" alt="Switch to WYSIWYG (design) mode" src="/im_cms/site/html_editor/lib/themes/default/img/tb_design_tab.gif" onClick="SPAW_design_tab_click('container',this)" class="SPAW_default_tb_out" onMouseOver="SPAW_default_bt_over(this)" onMouseOut="SPAW_default_bt_out(this)" onMouseDown="SPAW_default_bt_down(this)" onMouseUp="SPAW_default_bt_up(this)" unselectable="on"><img id="SPAW_container_tb_html_tab_on" alt="" src="/im_cms/site/html_editor/lib/themes/default/img/tb_html_tab_on.gif" unselectable="on"></td></tr></table></td><td class="SPAW_default_toolbar"></td></tr></table> </td> </tr> <tr> <td align="right" style="padding-top:15px;"><input type="submit" class="input-button" value="Save"></td> </tr> </form> </table> and here copy trace I get... INFO: Executing timeout: document.getElementById("container").value ="New html text added\n"; 2005.03.11 10:23:56 com.gargoylesoftware.htmlunit.javascript.host.Window$1 run INFO: Executing timeout: document.getElementById("container").value = document.getElementById("container").value.replace(/"/g,'"'); 2005.03.11 10:23:56 com.gargoylesoftware.htmlunit.javascript.host.Window$1 run INFO: Executing timeout: document.getElementById("container").value = document.getElementById("container").value.replace(/@@START_COMMENT/g,'<!--'); 2005.03.11 10:23:56 com.gargoylesoftware.htmlunit.javascript.host.Window$1 run INFO: Executing timeout: document.getElementById("container").value = document.getElementById("container").value.replace(/@@END_COMMENT/g,'-->'); 2005.03.11 10:23:56 com.gargoylesoftware.htmlunit.javascript.host.Window$1 run INFO: Executing timeout: SPAW_editorInit('container','/im_cms/site/html_editor/wysiwyg.css','ltr'); 2005.03.11 10:23:56 com.gargoylesoftware.htmlunit.javascript.host.Window$1 run SEVERE: Caught exception in Window.setTimeout() ======= EXCEPTION START ======== Exception class=[java.lang.IllegalStateException] com.gargoylesoftware.htmlunit.ScriptException at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:294) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(HtmlPage.java:709) at com.gargoylesoftware.htmlunit.javascript.host.Window$1.run(Window.java:266) at java.lang.Thread.run(Thread.java:536) Enclosed exception: java.lang.IllegalStateException at org.mozilla.javascript.ScriptRuntime.getTopCallScope(ScriptRuntime.java:2752) at org.mozilla.javascript.ScriptRuntime.toObjectOrNull(ScriptRuntime.java:838) at org.mozilla.javascript.ScriptRuntime.getPropFunctionAndThis(ScriptRuntime.java:1963) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2869) at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2164) at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:140) at org.mozilla.javascript.InterpretedFunction.exec(InterpretedFunction.java:149) at org.mozilla.javascript.Context.evaluateString(Context.java:1220) at com.gargoylesoftware.htmlunit.javascript.JavaScriptEngine.execute(JavaScriptEngine.java:289) at com.gargoylesoftware.htmlunit.html.HtmlPage.executeJavaScriptIfPossible(HtmlPage.java:709) at com.gargoylesoftware.htmlunit.javascript.host.Window$1.run(Window.java:266) at java.lang.Thread.run(Thread.java:536) == CALLING JAVASCRIPT == GargoyleWrapper15() ======= EXCEPTION END ======== any ideas are welcome ...it's strange that sometimes I get GargoyleWrapper18(), sometimes GargoyleWrapper15(), sometimes GargoyleWrapper13() and sometimes works just fine :) I have tried to setTimeout to webclient in my test, but it doesn't help, and that javascript code is not mine and it's inside of php code so it's hard to change something in the code client.setTimeout(10000); Thank you... __________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250 |