mic2100
06-01-2006, 11:56 AM
i have this function
function checktxt_telephone()
{
document.form1.txt_telephone.focus();
document.form1.txt_telephone.select();
}
and i want to use the send keys function at the end of this. The send keys must output CTRL + F2, it will be used to select a phone number in a textbox and press the keys so that another program can capture the event and dial the phone number (but i don't have to worry about that)
I have been looking at WSH... but with out much luck(i can simulate the keypresses i just can't get it working in javascript..
Does any one know how i would run a windows scripting file from a javascript page????
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.SendKeys "^{F2}"
this is the code i have made in a .vbs file and it works
function checktxt_telephone()
{
document.form1.txt_telephone.focus();
document.form1.txt_telephone.select();
}
and i want to use the send keys function at the end of this. The send keys must output CTRL + F2, it will be used to select a phone number in a textbox and press the keys so that another program can capture the event and dial the phone number (but i don't have to worry about that)
I have been looking at WSH... but with out much luck(i can simulate the keypresses i just can't get it working in javascript..
Does any one know how i would run a windows scripting file from a javascript page????
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.SendKeys "^{F2}"
this is the code i have made in a .vbs file and it works