anshuk_p
12-26-2005, 10:16 PM
I am using Java Script to open a dialog box to save a file at any particular directory.
<script type="text/javascript" language="JavaScript">
function SaveVarAsFile(someVar){
document.open("text/html","replace");
document.write(someVar);
document.close();
document.focus();
var isSave = document.execCommand('SaveAs');
if(isSave == true)
{
location.replace("/SavedWSDLFinal.jsp");
}
else
location.replace("l/CustomizeWSDL.jsp");
}
</script>
Now the file is being saved properly,no issues in that.
After saving the file, how to get the file name including the path from the User document.execCommand('SaveAs',)?
<script type="text/javascript" language="JavaScript">
function SaveVarAsFile(someVar){
document.open("text/html","replace");
document.write(someVar);
document.close();
document.focus();
var isSave = document.execCommand('SaveAs');
if(isSave == true)
{
location.replace("/SavedWSDLFinal.jsp");
}
else
location.replace("l/CustomizeWSDL.jsp");
}
</script>
Now the file is being saved properly,no issues in that.
After saving the file, how to get the file name including the path from the User document.execCommand('SaveAs',)?