🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.web
Article #459

Help with TCppWebBrowser - Find and click a button

#459
From: mike
Date: Fri, 05 Jan 2007 21:11
86 lines
3856 bytes
Hello, and Happy New Year to all.

I have a problem which I cannot seem to solve, and I do not know how to go 
about it. So if someone could help I would apprciate it very much.

The problem:

I would like to programmably be able to click a button on a web page loaded 
into a TCppWebBrowser. The web page has a Tree View, I believe, on the left 
side and the button is located within this view. If I view the source from 
within the browser the source looks like below:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<html>

<head>
<title>Links Screen</title>
<meta HTTP-EQUIV="Pragma" CONTENT="No-cache">
<meta HTTP-EQUIV="Cache-Control" CONTENT="No-cache">
<meta HTTP-EQUIV="Expires" CONTENT="0">
<meta HTTP-EQUIV="last modified" CONTENT="NOW">

<script LANGUAGE="JavaScript" SRC="/rpa/default/newAuthlib.js"></script>

<script language=javascript>
if (document.layers) {
  WW = innerWidth; WH = innerHeight;
  captureEvents(Event.RESIZE);
  onresize=function(){if 
(WW!=innerWidth||WH!=innerHeight){location.reload();return 0;}}
}
</script>

<base target="feature">
</head>

<body BGCOLOR="#FFCC33" Link="#800000" vLink="#800000" aLink="#000000"
 text="#000000" topmargin="0" leftmargin="0" marginheight="0" 
marginwidth="0">

<table height="100%" border="0" cellspacing="0" cellpadding="14" 
width="100%">
  <tr>
    <td valign="top"><font FACE="Arial, Verdana"><b><small>Authorized 
Links</small></b></font><p><font face="Arial, Verdana" size="2">
<ul>
<script LANGUAGE="JavaScript">
<!-- Hide script from older browsers.
buildLinks();
//alert('made it');
// End of the hiding here. -->
</script>
</ul></p>
    <form>
      <p><input TYPE="button" NAME="secure_exit" VALUE=" Finished " 
onClick="logout();"> <!--webbot bot="HTMLMarkup" 
startspan --></SCRIPT><!--webbot bot="HTMLMarkup" endspan --> </font></p>
    </form>
    </td>
  </tr>
  <tr>
    <td valign="bottom"><font face="Arial, Verdana" size="2"><p 
align="center"><img src="/rpa/default/images/epix_logo.gif"></p></font></td>
  </tr>
</table>
<!--<p><font face="Verdana" size="1">the following link is temporary... 
</font></p><form action="http://subscribe.eb.com/cgi-bin/institution_rem.pl" 
method="post">  <input type="hidden" name="uid" value="!@#als"><p><input 
type="submit" value="Britannica">  </p></form><p>&nbsp;</p>-->
</body>
</html>

I would like to be able to auto click the button above or invoke the 
logout() routine. I have a number of things to find this button but it does 
not seem I can find it. This portion of the web page may also reside within 
a frame but when I save all the frames source to a temp file this part of 
the source never shows up.

So I am at a loss to figure out how to get this to work and would appreciate 
any help I can get. I am not very familiar with trying to accomplish this 
type of work so samples code on how to get this to work would certainly be 
appreciated.

Thank you for helping if you can.

Mike 
Technical Details
Message-ID: <459ebec4$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: feeec,6ed59181280548e1,start
X-Google-Attributes: gidfeeec,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "mike" <mfbrowne@earthlink.nnet>
Newsgroups: borland.public.cppbuilder.internet.web
Subject: Help with TCppWebBrowser - Find and click a button
Date: Fri, 5 Jan 2007 16:11:07 -0500
Lines: 88
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2869
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 68.207.98.36
Message-ID: <459ebec4$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1168031428 68.207.98.36 (5 Jan 2007 13:10:28 -0800)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news4.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail