showModalDialog arguments does not pass in WPF WebBrowser control -
where url called via showmodaldialog
, in ie work in webbowser-control page appears, apparently not receive arguments.
here demonstration of problem, first page is: parent.html:, second page newform.html. in ie, second page works well: mydiv
contains input. while in webbowser-control mydiv
contains "type undefined".
parent.html:,
<!doctype html> <html> <head> <title>parentpage</title> </head> <body> <p >type text:</p> <input id="myinput"/> <button onclick="callprintnewform()">showmodaldialog</button> </body> <script language="javascript" type="text/javascript"> function callprintnewform() { var x = document.getelementbyid("myinput").value; alert(x); var wnd; wnd = window.showmodaldialog('newform.html', window, "dialogwidth:800px;dialogheight:600px;help:no;resizable:yes;scrollbars=yes") } </script> </html>
newform.html:,
<!doctype html> <html> <head> <title>dialogpage</title> </head> <body onload="javascript:window_onload();"> <div id="mydiv"></div> </body> <script language="javascript" type="text/javascript"> var wnd = null; wnd = window.dialogarguments; var data =wnd.document.getelementbyid("myinput").value; function window_onload() { document.getelementbyid("mydiv").innertext = "typed: " + data; } </script> </html>
work in ie in wpf
<webbrowser source="s:\tries\parent.html" />
the way looks arguments not pass dialog page according appears not supported, there workarounds?
it's not page , have no choice
thanks
Comments
Post a Comment