B
Benny Ng
Dear All,
In the following source. If we don't submit the data in the same page.
Then the function for save will be working fine. it will save the page to
mht extension automatically. (please see the combo box of file extension..)
but i don't know why, once i submit the data to self page. and click the
save button again. Then the popup box will not show "mht" extension as the
default extension. (now it will shows the "HTML" as the default option in
the extension combo box.).
could any body can helps me to fix it? or it's a bug for IE?
Please check the following source:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<form id='form1' name='form1' method='post' action='mht.asp'>
<input type=button name='btntest' value='test' onclick='jsmht();'>
<input type=submit name='btnsubmit' value='submit'>
</form>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!--
function jsmht()
{
window.document.title = 'good';
var OLECMDID_SAVEAS = 4;
var OLECMDEXECOPT_DONTPROMPTUSER = 2;
var OLECMDEXECOPT_PROMPTUSER = 1;
var WebBrowser = "<OBJECT ID=\"WebBrowser2\" WIDTH=0 HEIGHT=0
CLASSID=\"CLSID:8856F961-340A-11D0-A96B-00C04FD705A2\"></OBJECT>";
document.body.insertAdjacentHTML("beforeEnd", WebBrowser);
WebBrowser2.ExecWB(OLECMDID_SAVEAS, OLECMDEXECOPT_PROMPTUSER);
WebBrowser2.outerHTML = "";
}
//-->
</SCRIPT>
</BODY>
</HTML>
Thanks and Best Regards,
Benny Ng
In the following source. If we don't submit the data in the same page.
Then the function for save will be working fine. it will save the page to
mht extension automatically. (please see the combo box of file extension..)
but i don't know why, once i submit the data to self page. and click the
save button again. Then the popup box will not show "mht" extension as the
default extension. (now it will shows the "HTML" as the default option in
the extension combo box.).
could any body can helps me to fix it? or it's a bug for IE?
Please check the following source:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<form id='form1' name='form1' method='post' action='mht.asp'>
<input type=button name='btntest' value='test' onclick='jsmht();'>
<input type=submit name='btnsubmit' value='submit'>
</form>
<BODY>
<SCRIPT LANGUAGE="JavaScript">
<!--
function jsmht()
{
window.document.title = 'good';
var OLECMDID_SAVEAS = 4;
var OLECMDEXECOPT_DONTPROMPTUSER = 2;
var OLECMDEXECOPT_PROMPTUSER = 1;
var WebBrowser = "<OBJECT ID=\"WebBrowser2\" WIDTH=0 HEIGHT=0
CLASSID=\"CLSID:8856F961-340A-11D0-A96B-00C04FD705A2\"></OBJECT>";
document.body.insertAdjacentHTML("beforeEnd", WebBrowser);
WebBrowser2.ExecWB(OLECMDID_SAVEAS, OLECMDEXECOPT_PROMPTUSER);
WebBrowser2.outerHTML = "";
}
//-->
</SCRIPT>
</BODY>
</HTML>
Thanks and Best Regards,
Benny Ng