Ambientguitar
Programmer
Code:
<a href="#" onclick="PrintPdf()" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-download fa-sm text-white-50"></i> Generate Report</a>
Okay Guys If I run this I am getting zilch, nada, nothing, null!
I have tried using onclick=PrintPdf() - onclick="PrintPdf();" - onclick="call PrintPdf()" All to no avail. I am trying to run a batch file. If I change this to Javascript and click teh button it calls
a Javascript but I need the Vbscript.
Code:
<script language="vbscript">
Sub PrintPdf()
Dim oShell,strPath
Set oShell = CreateObject ("WScript.Shell")
strPath1=Server.MapPath("PDFSaveTest.bat")
oShell.Run strPath1
set OShell= (Nothing)
End Sub
</script>