I have a hidden div that is to be hiden/shown using javascript immediately after a button is clicked then selected printer is installed using vbscript. everything works but in the wrong order i click vb_yes and the printer imediatly gets installed with out displaying the div. the div then will show after the printer has been installed. any sugestions?
//Code for button
<input language="vbscript" type="button" value="vb_yes" onclick="vbscript:Call Installprinter('4014','true')">
//function that runs when button is press
Function Installprinter(printer_name, default)
if installingdiv() = "true" then //java script function to show the installing div.
Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection printer_name
If default = "true" Then
WshNetwork.SetDefaultPrinter printer_name
End If
end if
End Function
//Java script function
function installingdiv()
{
var setdefaultdiv = document.getElementById("installwnd_body_setdefault")
var installprinterdiv = document.getElementById("installwnd_body_install")
setdefaultdiv.style.display = "none";
installprinterdiv.style.display = "";
return "true";
}
any help will be much apreciated.
Thank you
Jason
//Code for button
<input language="vbscript" type="button" value="vb_yes" onclick="vbscript:Call Installprinter('4014','true')">
//function that runs when button is press
Function Installprinter(printer_name, default)
if installingdiv() = "true" then //java script function to show the installing div.
Set WshNetwork = CreateObject("WScript.Network")
WshNetwork.AddWindowsPrinterConnection printer_name
If default = "true" Then
WshNetwork.SetDefaultPrinter printer_name
End If
end if
End Function
//Java script function
function installingdiv()
{
var setdefaultdiv = document.getElementById("installwnd_body_setdefault")
var installprinterdiv = document.getElementById("installwnd_body_install")
setdefaultdiv.style.display = "none";
installprinterdiv.style.display = "";
return "true";
}
any help will be much apreciated.
Thank you
Jason