lglover241
12-10-2003, 11:00 AM
HELP!
I am trying to use _javascript inside a method to:
1. Navigate to a particular website
2. Once navigated get the Document and form
3. pass a variable and submit it to the form
Everything works fine when the website is up and running but if the website is down it will still try to "submit" on the particular url and throw an error. I have tried to research options on the web but without luck. I am getting frustrated and any help would be much appreciated.
Here is the code:
var IE = COMCreateObject ("InternetExplorer.Application"); THIS CREATES THE IE Object
IE.Visible = 1; THIS MAKES IT VISIBLE
IE.Navigate "website.com/page.jsp");
THIS NAVIGATES IE TO THE JSP PAGE
IE.Document.forms("formname").elements("element").value = passed variable;
THIS GETS THE FORM, ELEMENT AND SETS THE VALUE
IE.document.forms.submit();
THIS SUBMITS THE FORMHELP!
I am trying to use _javascript inside a method to:
1. Navigate to a particular website
2. Once navigated get the Document and form
3. pass a variable and submit it to the form
Everything works fine when the website is up and running but if the website is down it will still try to "submit" on the particular url and throw an error. I have tried to research options on the web but without luck. I am getting frustrated and any help would be much appreciated.
Here is the code:
var IE = COMCreateObject ("InternetExplorer.Application"); THIS CREATES THE IE Object
IE.Visible = 1; THIS MAKES IT VISIBLE
IE.Navigate "website.com/page.jsp");
THIS NAVIGATES IE TO THE JSP PAGE
IE.Document.forms("formname").elements("element").value = passed variable;
THIS GETS THE FORM, ELEMENT AND SETS THE VALUE
IE.document.forms.submit();
THIS SUBMITS THE FORMHELP!