N
Nixter
I am scripting the input to an intranet website and am getting stuck at the
clicking submit button - despite trrying code samples from other posts and
boards...
essentially I am taking the value in cell A1, defining it as "base_url", and
navigating to that page. The script pulls in the IE page, waits for the load,
the password is entered successfully, and there's where it all ends where I
am trying to have a 'submit' event happen to the submit button. The button is
not named and everything runs fine up to the point of button click. Password
values pass thru no problem as when I manually click the button it navigates
to the next page...
I have tried, among other things in the code below:
..submit
..click
Sendkeys sequences
End With
..Visible = True
SendKeys "{TAB}", True
SendKeys "~", True
The text in the code:
input type=text name='orderID' value='370732'
is passed from the server upon URL navigation...
Still nothing. I am racking my brain - there's no reason I can think of for
this not to work. The "Click Submit" bolded below is where it hangs...
Thanks MUCH!
Coding below
code from the server:
--------------------------------------------------------------------------------
<FORM ACTION='' method='POST'>
<table><tr>
<td><b>Enter The Server Password: </b></td>
<td align=left><input type='password' name='password'></td></tr>
<tr>
<td><b>Enter The Filename</b></td>
<td align=left><input type=text name='orderID' value='370732'></td></tr>
<tr><td></td><td align=center><input type='Submit' value='Submit'>
</td></tr></table>
</FORM>
</body>
</html>
--------------------------------------------------------------------------------
--- VB Script ---
Sub process_item()
Sheets("input").Select
base_url = Cells(1, 1).Value
Range("A1").Select
Dim url As String
url = base_url
Dim ie As Object
'Dim document As Object
Set ie = CreateObject("internetexplorer.application")
With ie
..Visible = True
..Navigate base_url
Do While .ReadyState <> 4
DoEvents
Loop
With .document.all
..Password.Value = "password123"
(This is where I hang up)
--> CLICK SUBMIT <--
clicking submit button - despite trrying code samples from other posts and
boards...
essentially I am taking the value in cell A1, defining it as "base_url", and
navigating to that page. The script pulls in the IE page, waits for the load,
the password is entered successfully, and there's where it all ends where I
am trying to have a 'submit' event happen to the submit button. The button is
not named and everything runs fine up to the point of button click. Password
values pass thru no problem as when I manually click the button it navigates
to the next page...
I have tried, among other things in the code below:
..submit
..click
Sendkeys sequences
End With
..Visible = True
SendKeys "{TAB}", True
SendKeys "~", True
The text in the code:
input type=text name='orderID' value='370732'
is passed from the server upon URL navigation...
Still nothing. I am racking my brain - there's no reason I can think of for
this not to work. The "Click Submit" bolded below is where it hangs...
Thanks MUCH!
Coding below
code from the server:
--------------------------------------------------------------------------------
<FORM ACTION='' method='POST'>
<table><tr>
<td><b>Enter The Server Password: </b></td>
<td align=left><input type='password' name='password'></td></tr>
<tr>
<td><b>Enter The Filename</b></td>
<td align=left><input type=text name='orderID' value='370732'></td></tr>
<tr><td></td><td align=center><input type='Submit' value='Submit'>
</td></tr></table>
</FORM>
</body>
</html>
--------------------------------------------------------------------------------
--- VB Script ---
Sub process_item()
Sheets("input").Select
base_url = Cells(1, 1).Value
Range("A1").Select
Dim url As String
url = base_url
Dim ie As Object
'Dim document As Object
Set ie = CreateObject("internetexplorer.application")
With ie
..Visible = True
..Navigate base_url
Do While .ReadyState <> 4
DoEvents
Loop
With .document.all
..Password.Value = "password123"
(This is where I hang up)
--> CLICK SUBMIT <--