Hello everybody,
I would like to export the coneten of a window to a text editor(notepad, word,...) when I click on the button "Export". I' ve tried the the following code (export to notepad) but I dont get even the notepad open..
Any suggetion?
<html>
<head>
<script language="vbscript">
Function export ()
Dim WshShell
' déclaration of a WshShell objet
Set WshShell = CreateObject("Wscript.Shell")
' start notepad to the client side
WshShell.Run "%windir%\notepad "
' destruction of the WshShell objet
Set WshShell = nothing
End Function
</script>
<script type="text/javascript"><!--
function showdata (f) {
var myWin = window.open('', '', 'width=500,height=550,toolbar=no,scrollbars=no,sta
tus=no,menubar=no');
var msg = '<html><head><title>Data</title></head><body bgcolor="white">';
msg+= '<table border="0"><tr><td colspan="2" align ="center"><b>your data</b> </td></tr>';
msg+= '<tr><td> Name : </td><td>' + f.myname.value + '</td></tr>';
msg+= '<tr><td> first name: </td><td>' + f.myfname.value + '</td></tr>';
msg+= '<tr><td> Adress : </td><td>' + f.myadress.value + '</td></tr>';
msg+= '<tr><td> Zipcode: </td><td>' + f.Zip.value + '</td></tr>';
msg+= '<tr><td><form><input type="button" value="Printdata" onClick="window.print()"></td></tr>';
msg+= '<tr><td><input type="button" value="Export" onClick="export()"></from></td></tr></table>';
msg+= '</body></html>';
myWin.document.open();
myWin.document.write(msg);
myWin.document.close();
} //-->
</script>
</head>
<body bgcolor="#80FBFF">
<form method="POST" action="Emailen.asp" name="myform">
<table border="1" width="70%" cellspacing="0">
<tr><td><input type="text" name="myname"></td></tr>
<tr><td><input type="text" name="myfname"></td></tr>
<tr><td><input type="text" name="myadress"></td></tr>
<tr><td><input type="text" name="Zip"></td></tr>
<tr><td><input type="button" value="zend" name="btnverzend" onClick="showdata(myform)"></td>
</tr>
</table>
</form>
</body>
</html>
I would like to export the coneten of a window to a text editor(notepad, word,...) when I click on the button "Export". I' ve tried the the following code (export to notepad) but I dont get even the notepad open..
Any suggetion?
<html>
<head>
<script language="vbscript">
Function export ()
Dim WshShell
' déclaration of a WshShell objet
Set WshShell = CreateObject("Wscript.Shell")
' start notepad to the client side
WshShell.Run "%windir%\notepad "
' destruction of the WshShell objet
Set WshShell = nothing
End Function
</script>
<script type="text/javascript"><!--
function showdata (f) {
var myWin = window.open('', '', 'width=500,height=550,toolbar=no,scrollbars=no,sta
tus=no,menubar=no');
var msg = '<html><head><title>Data</title></head><body bgcolor="white">';
msg+= '<table border="0"><tr><td colspan="2" align ="center"><b>your data</b> </td></tr>';
msg+= '<tr><td> Name : </td><td>' + f.myname.value + '</td></tr>';
msg+= '<tr><td> first name: </td><td>' + f.myfname.value + '</td></tr>';
msg+= '<tr><td> Adress : </td><td>' + f.myadress.value + '</td></tr>';
msg+= '<tr><td> Zipcode: </td><td>' + f.Zip.value + '</td></tr>';
msg+= '<tr><td><form><input type="button" value="Printdata" onClick="window.print()"></td></tr>';
msg+= '<tr><td><input type="button" value="Export" onClick="export()"></from></td></tr></table>';
msg+= '</body></html>';
myWin.document.open();
myWin.document.write(msg);
myWin.document.close();
} //-->
</script>
</head>
<body bgcolor="#80FBFF">
<form method="POST" action="Emailen.asp" name="myform">
<table border="1" width="70%" cellspacing="0">
<tr><td><input type="text" name="myname"></td></tr>
<tr><td><input type="text" name="myfname"></td></tr>
<tr><td><input type="text" name="myadress"></td></tr>
<tr><td><input type="text" name="Zip"></td></tr>
<tr><td><input type="button" value="zend" name="btnverzend" onClick="showdata(myform)"></td>
</tr>
</table>
</form>
</body>
</html>
Comment