Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to check if Valid 1

Status
Not open for further replies.

SDyke

MIS
Oct 13, 2005
55
US
How can I check to see if this is ok before running any othe code?

var wshshell=new ActiveXObject("wscript.shell");
 
How about
Code:
if (wshshell != null)
or
Code:
if (wshshell != undefined)

Lee
 
I am getting an error on the line of code it self before I can even test the wshshell value.

"Automation server can't create object
 
try a javascript try catch

Code:
try{
adlert()"test");
}
catch(e){
alert("error");
}
 
SDyke, now that you've been a member of the site for over 2 years and have asked a good handful of questions, how about clicking the "thank j4606 for this valuable post" link? This will award j4606 with a vote for the tipmaster of the week, and is a great way to say "thanks" for the help you have received.

Awarding stars is oft overlooked by new members of the site, but you've been around a while [smile]

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
[small]<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B> bites again.[/small]
 
I agree with kaht and would like to add that another good way to thank users is to buy puppies from them.
 
another good way to thank users is to buy puppies from them

Agreed, just ask gmmastros [smile]

-kaht

Lisa, if you don't like your job you don't strike. You just go in every day and do it really half-assed. That's the American way. - Homer Simpson
[small]<P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <B> <P> <.</B> bites again.[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top