View Single Post
  #17   Report Post  
Posted to microsoft.public.excel.programming
Tim Coddington Tim Coddington is offline
external usenet poster
 
Posts: 94
Default Web browser question

First, if I havn't said it before, I really appreciate all your help.
That being said, now I am back to where I was before reading about the
WebBrowser object (but in better shape). Have tried out your code as
follows:

Public Sub InitAlphaTrade()
Dim ieAlphaTrade As InternetExplorer

Set ieAlphaTrade = New InternetExplorer
ieAlphaTrade.Visible = True
ieAlphaTrade.Navigate "https://www.alphatrade.com/login"
Do Until ieAlphaTrade.ReadyState = READYSTATE_COMPLETE
DoEvents
Loop

'Log on
Set ipf = ieAlphaTrade.Document.all.Item("userName")
ipf.Value = "Jeannie"
Set ipf = ieAlphaTrade.Document.all.Item("userPassword")
ipf.Value = "mypw"
ifp.Click
ieAlphaTrade.Quit
Set ieAlphaTrade = Nothing

End Sub

I haven't been able to figure out how the ifp.Click can be modified to work
for my case. Something to do with not understanding IE or web pages or
JavaScript or some such. Perhaps someone can help me. Here is a snip from
the HTML ...

<tr
<td bgcolor="#3366cc"
<form method="POST"
action="/com.alphatrade.servlet.http.HttpLoginServlet" target="_top"
ENCTYPE="application/x-www-form-urlencoded" name="loginForm"
onsubmit="doLogin()"
<input type="hidden" name="stageNumber" value="0"
<input type="hidden" name="AppletCodeBase"
value="/E_Gate/tails/java/classes/"
<input type="hidden" name="SiteName" value="AlphaTrade.com"
<input type="hidden" name="logoURL" value="www.alphatrade.com"
<input type="hidden" name="badLoginPage"
value="http://www.alphatrade.com/badlogin.html"
<input type="hidden" name="thanksPage" value="ads.txt"
<table width="450" border="0" cellpadding="8"
<tr
<td width="75" align="right" class="white1"<BLogin Name</b</td
<td<input type="text" name="userName" size="10"
style="background-color:#dfefff"</td
<td rowspan="3" valign="top"<p
style="font-size:9pt;color:#ffffff;"<bDisclaimer</b: &nbsp; As your
agreement for the receipt and use of market data provides, the securities
markets (1) reserve all rights to the market data that they make available;
(2) do not guarantee that data; and (3) shall not be liable for any loss due
either to their negligence or to any cause beyond their reasonable
control.</p</td
</tr
<tr
<td align="right" class="white1"<BPassword</B</td
<td<input type="password" name="userPassword" size="10"
style="background-color:#dfefff"</td
</tr
<tr
<td&nbsp;</td
<td align="center"<input type="image"
src="images/button-login-t.gif"</td
</tr
</table
</form
<script language="JavaScript" type="text/javascript"
document.loginForm.userName.focus();
</script
</td
</tr

Again, my appreciation and Merry Christmas!
-Tim

<snip