Thread View: borland.public.cppbuilder.internet.web
4 messages
4 total messages
Started by Caleb
Wed, 28 Dec 2005 01:13
Gambit TCppWebBrowser / IHTMLDocument2 / form->submit() problem
Author: Caleb
Date: Wed, 28 Dec 2005 01:13
Date: Wed, 28 Dec 2005 01:13
38 lines
2010 bytes
2010 bytes
Hello: I am trying to subimt a form using code that normally works. It did not work on a certain page in my project. I then iterated though the elements in the document to locate the submit button, tried element->click() and this too did not work. However: I noticed that if I clicked the button manually, the page would not change but the button would appear to click. So I made a separate test program with just a TCppWebBrowser in the form and manually navigated to the page in question and it DID behave as expected when clicked. There is some logic in the automated program -- not the test program -- where the browser is saved to a text file. In the automated program it starts at page A and when that is processed it may navigate to a page B or a page C. The logic is vanilla code often posted in this group that saves the document to a stream and then saves it to a file. This logic checks to see if the browser navigated to page B or page C. Is there any way that saving the browser contents to file would effect the ability to submit the form? As I said the form submit logic usually works. The page is a simple "I agree" page wih only one submit button. Thank you, Caleb
Re: Gambit TCppWebBrowser / IHTMLDocument2 / form->submit() problem
Author: Remy Lebeau (TeamB)
Date: Wed, 28 Dec 2005 09:06
Date: Wed, 28 Dec 2005 09:06
27 lines
1998 bytes
1998 bytes
"Caleb" <nospam@nospam.com> wrote in message news:43b1f4db$1@newsgroups.borland.com... > It did not work on a certain page in my project. > > I then iterated though the elements in the document to locate > the submit button, tried element->click() and this too did not > work. Just saying it does not work says nothing about the actual problem you are having. Always provide specific details. > Is there any way that saving the browser contents to file would > effect the ability to submit the form? Possibly. The URL of the current page is effected by the location of the file. When submitting a form, the form has to specify where it is to be submitted to. Most HTML developers do not use full URLs for that location, which means that the location the form will be submitted to is relative to the source URL of the file that contains the form. What EXACTLY does the HTML look like, and where EXACTLY are you loading it from? Ganbut
Re: Gambit TCppWebBrowser / IHTMLDocument2 / form->submit() problem
Author: Caleb
Date: Wed, 28 Dec 2005 11:26
Date: Wed, 28 Dec 2005 11:26
465 lines
22785 bytes
22785 bytes
On Wed, 28 Dec 2005 01:06:52 -0800, "Remy Lebeau \(TeamB\)"
<no.spam@no.spam.com> wrote:
>
>"Caleb" <nospam@nospam.com> wrote in message
>news:43b1f4db$1@newsgroups.borland.com...
>
>> It did not work on a certain page in my project.
>>
>> I then iterated though the elements in the document to locate
>> the submit button, tried element->click() and this too did not
>> work.
>
>Just saying it does not work says nothing about the actual problem you are
>having. Always provide specific details.
>
Yes.
>> Is there any way that saving the browser contents to file would
>> effect the ability to submit the form?
>
>Possibly. The URL of the current page is effected by the location of the
>file. When submitting a form, the form has to specify where it is to be
>submitted to. Most HTML developers do not use full URLs for that location,
>which means that the location the form will be submitted to is relative to
>the source URL of the file that contains the form.
>
>What EXACTLY does the HTML look like, and where EXACTLY are you loading it
>from?
>
/////////////////////////////// begin EXACT HTML
<html><head>
<!--eBay V3- msxml 4.0 XXXXXXXXXXXXXXXXXXXXXXXXXX-->
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"><title>
Terms of Use: Mature Audiences Category ("Terms of Use")
</title><link rel="stylesheet"
href="http://include.ebaystatic.com/aw/pics/css/tbx/common.css"
type="text/css"></head><body bgcolor="#FFFFFF"><!--Header code
starts--><!--2005-11-28 18:43:07,,--><noscript><link rel="stylesheet"
type="text/css"
href="http://include.ebaystatic.com/aw/pics/css/ebay.css"
/></noscript>
<script language="JavaScript">
<!--
function SymError()
{
return true;
}
window.onerror = SymError;
var SymRealWinOpen = window.open;
function SymWinOpen(url, name, attributes)
{
return (new Object());
}
window.open = SymWinOpen;
//-->
</script>
<script type="text/javascript" language="JavaScript1.1">includeHost =
'http://include.ebaystatic.com/';
cmdName='AdultSignIn';
</script><script
src="http://include.ebaystatic.com/js/e437/us/ebaybase_e4373us.js">
</script><script
src="http://include.ebaystatic.com/js/e437/us/ebaysup_e4373us.js">
</script><script type="text/javascript" language="JavaScript1.1">
ebay.oDocument._getControl("headerCommon")._exec("writeStyleSheet");
</script><script type="text/javascript"
language="JavaScript1.1">
ebay.oDocument._getControlEx("cobrandCollection")._exec("writeHeader");
</script><span class="ebay"><form class="nomargin"
method="get" name="headerSearch"
onsubmit="ebay.oDocument._getControl('searchHeader')._exec('submitHeaderSearch',
this, 'http://search.ebay.com', '000', 'Start new search');"
action="http://search.ebay.com/search/search.dll"><input type="hidden"
name="from" value="R40" /><table border="0" cellpadding="0"
cellspacing="0" width="100%"><tr valign="top"><td width="0%"><script
type="text/javascript"
language="JavaScript1.1">ebay.oDocument._getControlEx("cobrandCollection")._exec("writeBrow");</script><a
href="http://www.ebay.com/"><img border="0" alt="From collectibles to
cars, buy and sell all kinds of items on eBay" title="From
collectibles to cars, buy and sell all kinds of items on eBay"
src="http://pics.ebaystatic.com/aw/pics/navbar/eBayLogoTM.gif"
/></a></td><td width="0%"><img
src="http://pics.ebaystatic.com/aw/pics/s.gif" width="10" height="1"
/></td><td height="28" width="100%" valign="bottom"><table
bgcolor="#EFEFEF" border="0" cellpadding="0" cellspacing="0"
height="28" width="100%"><tr><td height="28" valign="top"
width="0%"><img
src="http://pics.ebaystatic.com/aw/pics/navbar/topLeft_12x12.gif"
width="12" height="12" /></td><td class="novisited" nowrap="nowrap"
width="100%"><span class="pipe"><a
href="http://www.ebay.com/">home</a> | <a
href="http://my.ebay.com/ws/eBayISAPI.dll?MyeBay&CurrentPage=MyeBayWon&SubmitAction.ChangeFilter=x&View=Won&NewFilter=WaitPayment#Won">pay</a><script
type="text/javascript"
language="JavaScript1.1">ebay.oDocument._getControl("signIn")._exec("writeLink","register","http://cgi1.ebay.com/aw-cgi/eBayISAPI.dll?RegisterShow","","",false,true,null);</script><noscript>
| <a
href="http://cgi1.ebay.com/aw-cgi/eBayISAPI.dll?RegisterShow">register</a></noscript><script
type="text/javascript" language="JavaScript1.1">
ebay.oDocument._getControl("signIn")._exec("writeLink","sign
in","http://signin.ebay.com/ws/eBayISAPI.dll?SignIn&ssPageName=h:h:sin:US","sign
out","http://signin.ebay.com/ws/eBayISAPI.dll?SignIn&ssPageName=h:h:sout:US",false,true,null);</script><noscript>
| <a href="http://signin.ebay.com/ws/eBayISAPI.dll?SignIn"
class="novisited">sign in/out</a></noscript> | <a
href="http://pages.ebay.com/sitemap.html">site map</a></span></td><td
width="0%"><img src="http://pics.ebaystatic.com/aw/pics/s.gif"
width="20" height="1" /></td><td align="right" nowrap="nowrap"
valign="bottom" width="0%"><span class="ebay"><script
language="JavaScript">ebay.oDocument._getControl("searchHeader")._exec("writeSearch","Start
new search","20", "standard");</script><noscript><input type="text"
class="prefill" maxlength="300" name="satitle" size="20"
/></noscript><img src="http://pics.ebaystatic.com/aw/pics/s.gif"
width="1" height="1" /><input type="submit" class="standard"
value="Search" /></span></td><td valign="top"><img
src="http://pics.ebaystatic.com/aw/pics/navbar/topRight_12x12.gif"
width="12" height="12" /></td></tr></table><table bgcolor="#EFEFEF"
border="0" cellpadding="0" cellspacing="0" height="24"
width="100%"><tr><td height="24" nowrap="nowrap" valign="bottom"
width="100%"><a href="http://hub.ebay.com/buy"><img border="0"
alt="Shop for items" title="Shop for items"
src="http://pics.ebaystatic.com/aw/pics/navbar/buyOn.gif" /></a><a
href="http://sell.ebay.com/sell"><img border="0" alt="Sell your item"
title="Sell your item"
src="http://pics.ebaystatic.com/aw/pics/navbar/sell.gif" /></a><a
href="http://my.ebay.com/ws/eBayISAPI.dll?MyeBay"><img border="0"
alt="Track your eBay activities" title="Track your eBay activities"
src="http://pics.ebaystatic.com/aw/pics/navbar/myebay.gif" /></a><a
href="http://hub.ebay.com/community"><img border="0" alt="Learn,
connect, and stay informed-for business and for fun" title="Learn,
connect, and stay informed-for business and for fun"
src="http://pics.ebaystatic.com/aw/pics/navbar/comm.gif" /></a><a
href="http://pages.ebay.com/help/index.html"><img border="0" alt="Get
help, find answers and contact Customer Support" title="Get help, find
answers and contact Customer Support"
src="http://pics.ebaystatic.com/aw/pics/navbar/help.gif"
/></a></td><td width="0%"><img
src="http://pics.ebaystatic.com/aw/pics/s.gif" width="10" height="1"
/></td><td align="right" class="novisited" nowrap="nowrap"
valign="top"><span class="ebay"><a class="standard"
href="http://search.ebay.com/ws/search/AdvSearch?sofindtype=13&amp;ssPageName=h:h:advsearch:US">Advanced
Search</a></span></td><td><img
src="http://pics.ebaystatic.com/aw/pics/s.gif" alt=" " width="12"
height="1" /></td></tr><tr><td bgcolor="#000099" colspan="4"
height="1"><img src="http://pics.ebaystatic.com/aw/pics/s.gif"
height="1" /></td></tr></table><table border="0" cellpadding="0"
cellspacing="0" width="100%"><tr valign="top"><td width="100%"><table
border="0" cellspacing="0" cellpadding="0"><tr><td height="8"><img
src="http://pics.ebaystatic.com/aw/pics/s.gif" height="8"
/></td></tr><tr><td><script type="text/javascript"
language="Javascript1.1">
ebay.oDocument._getControl("greetings")._exec("writePersonalHeader","Sign
in","http://signin.ebay.com/ws/eBayISAPI.dll?SignIn&ssPageName=h:h:sin:US",
"register","http://cgi1.ebay.com/aw-cgi/eBayISAPI.dll?RegisterShow",
"Sign out","http://signin.ebay.com/ws/eBayISAPI.dll?SignIn",'Hello!
<span style="white-space: nowrap;" class="help">##1## or
##2##.</span>','Hello, ##1##! <span style="white-space: nowrap;"
class="help">(##2##.)</span>','Hello, ##1##! <span style="white-space:
nowrap;" class="help">(Not you? ##2##.)</span>','Hello! <a
href="http://signin.ebay.com/ws/eBayISAPI.dll?SignIn"
class="novisited">Sign in/out</a>.','<img
src="http://pics.ebaystatic.com/aw/pics//icon/iconWarnRed_16x16.gif"
title="Alert" alt="Alert" />',' | You have <a
href="http://my.ebay.com/ws/eBayISAPI.dll?MyeBay&CurrentPage=MyeBayMyMessages&ssPageName=STRK:MM:GHRMDR&FolderId=0">
##1## alert</a>.',' | You have <a
href="http://my.ebay.com/ws/eBayISAPI.dll?MyeBay&CurrentPage=MyeBayMyMessages&ssPageName=STRK:MM:GHRMDR&FolderId=0">
##1## alerts</a>.',1,null);</script><noscript>Hello! <a
href="http://signin.ebay.com/ws/eBayISAPI.dll?SignIn"
class="novisited">Sign in/out</a>.</noscript><img
src="http://pics.ebaystatic.com/aw/pics/s.gif" height="16" width="1"
/><span style="white-space: nowrap;" class="help" id="BTAMarker"
/><script type="text/javascript" language="Javascript1.1">
ebay.oDocument.oPage.createBTAConfig = function()
{
var cfg = this.oDocument.addConfig(new
EbayConfig("Header.Alert.Transaction"));
cfg.sMarkerDivId = "BTAMarker";
cfg.iPollingInterval = 60;
cfg.sServerUrl =
'http://bmsgs.ebay.com/ws/eBayISAPI.dll?GetBuyerTransactionAlerts';
cfg.iMaxServerHits = 2;
cfg.iServerHitTimeout =5;
cfg.sViewItemUrl =
'http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem';
cfg.sImgServer = "http://pics.ebaystatic.com/aw/pics/";
cfg.aAlertInfo = new Array();
cfg.aAlertInfo[0] = ["h:h:alt:2","You've been
outbid!","icon/iconOutbid_16x16.gif"];
cfg.aAlertInfo[1] = ["h:h:alt:3","Watched Item ending
soon!","icon/iconWatchB_16x16.gif"];
cfg.aAlertInfo[2] = ["h:h:alt:4","You've been
outbid!","icon/iconOutbid_16x16.gif"];
}
ebay.oDocument.oPage.createBTAConfig();</script></td></tr><tr><td
height="8"><img src="http://pics.ebaystatic.com/aw/pics/s.gif"
height="8" /></td></tr></table></td><td class="navigation"
nowrap="nowrap"><br /><table border="0" cellspacing="0"
cellpadding="0"><tr><td /></tr></table><script language="JavaScript">
if(!document.layers){document.write('<img
src="http://pics.ebaystatic.com/aw/pics/s.gif" width="1" height="5"
/>');}
</script><noscript><img src="http://pics.ebaystatic.com/aw/pics/s.gif"
width="1" height="5" /></noscript></td><td width="0%"><img
src="http://pics.ebaystatic.com/aw/pics/s.gif" width="10" height="1"
/></td><td align="right"
width="0%"><script>ebay.oDocument._getControl('poweredby')._exec('writeSource','<a
onclick="ebayShowPopupWindow(this.href, \'Sponsor\', 364, 275); return
false;" href="http://sun.ebay.com/odcs/custom.htm?template=popup"><img
src="http://pics.ebaystatic.com/aw/pics/navbar/poweredByLogo_112x22.gif"
border="0" /></a>');</script><noscript><img
src="http://pics.ebaystatic.com/aw/pics/navbar/poweredByLogo_112x22.gif"
width="112" height="22" border="0"
/></noscript></td></tr></table></td></tr></table></form></span><!--Header
code ends--><script type="text/javascript" language="JavaScript">var
pageName='AdultSignIn';var pageType='';var siteId='0';var
cobrandId='2';var server=location.hostname.toLowerCase();var
channel='eBay';var colorScheme='transaction';var
imagePath='http://pics.ebaystatic.com/aw/pics/';var
scriptPath='http://include.ebaystatic.com/aw/pics/';var
stylePath='http://include.ebaystatic.com/aw/pics/';var
helpPath='http://pages.ebay.com/help/';var jsPath=scriptPath;var
ebayToolbox='true';</script><form action="" method="" name=""
style="border: 0;margin: 0;"><div><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" width="1"
height="10"></div><table border="0" cellpadding="0" cellspacing="0"
width="100%"><tr><td bgcolor="#9999CC"><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" height="2"
width="1"></td></tr></table><table border="0" cellpadding="0"
cellspacing="0" width="100%" bgcolor="#D6DEFF"><tr><td><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" height="25"
width="19"></td><td width="100%"><span class="pagetitle">Terms of Use:
Mature Audiences Category ("Terms of Use")</span></td><td><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" height="1"
width="6"></td></tr></table><table border="0" cellpadding="0"
cellspacing="0" width="100%"><tr><td bgcolor="#9999CC"><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" height="2"
width="1"></td></tr></table><div id="page_message"><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" width="1"
height="1"></div><div><form
action="http://signin.ebay.com/ws/eBayISAPI.dll" method="post"
name="AdultCheck" style="border: 0;margin: 0;"><div><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" width="1"
height="10"></div><div><table cellpadding="0" cellspacing="0"
border="0" width="100%"><tr><td><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" width="10"
height="1"></td><td width="100%">
You must be a responsible adult over the age of 18 (or
the age of consent in the jurisdiction from which this site is being
accessed) to view the Adults-Only category pages. Materials available
in this category include graphic visual depictions and descriptions of
nudity and sexual activity. Federal, state or local laws may prohibit
visiting this adult category if you are under 18 years of age. By
entering your User ID and Password to access this site, to list an
item, or to bid on an item in this category, you are making the
following statements:
</td><td><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" width="10"
height="1"></td></tr></table></div><div><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" width="1"
height="10"></div><div><table cellpadding="0" cellspacing="0"
border="0" width="100%"><tr><td><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" width="10"
height="1"></td><td width="100%"><table cellpadding="0"
cellspacing="0" border="0"><tr><td><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" width="10"
height="1"></td><td><table cellpadding="0" cellspacing="0" border="0"
width="100%"><tr><td valign="top">1.�
</td><td valign="top">I am a
member of the eBay community and I will follow the eBay User Agreement
governing my use of the eBay web site.</td></tr><tr><td
valign="top">2.�
</td><td valign="top">I am
willing to provide eBay with my valid credit card number and
expiration date, which will be left on file with eBay in order to
verify that I am at least 18 years of age.</td></tr><tr><td
valign="top">3.�
</td><td valign="top">I will
not permit any person(s) under 18 years of age to have access to any
of the materials contained within this site.</td></tr><tr><td
valign="top">4.�
</td><td valign="top">I am
voluntarily choosing to access this category, because I want to view,
read and/or hear the various materials that are
available.</td></tr><tr><td valign="top">5.�
</td><td valign="top">I
understand and agree to abide by the standards and laws of the
community in which I live or from which I am accessing this
site.</td></tr><tr><td valign="top">6.�
</td><td valign="top">By
entering my User ID and Password and viewing any part of this adult
category, I agree that I shall not hold eBay or its employees
responsible for any materials located in the adult category, and I
waive all claims against eBay relating to materials found at this
site.</td></tr><tr><td valign="top">7.�
</td><td valign="top">If I use
these services in violation of these Terms and Use, I understand I may
be in violation of local and/or federal laws and am solely responsible
for my actions.</td></tr><tr><td valign="top">8.�
</td><td valign="top">I am an
adult, at least 18 years of age, and I have a legal right to possess
adult material in my community.</td></tr><tr><td valign="top">9.�
</td><td valign="top">I do not
find pornographic images of nude adults, adults engaged in sexual acts
or other sexual material to be offensive or
objectionable.</td></tr><tr><td valign="top">10.�
</td><td valign="top">I will
exit from this site immediately if I am in any way offended by the
sexual nature of any materials on this site.</td></tr><tr><td
valign="top">11.�
</td><td valign="top">By
entering my User ID and Password at the bottom of these Terms of Use,
and by listing, bidding an item, or entering the adult site, I agree
to abide by these
terms.</td></tr></table></td></tr></table></td><td><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" width="10"
height="1"></td></tr></table></div><div><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" width="1"
height="10"></div><div><table cellpadding="0" cellspacing="0"
border="0" width="100%"><tr><td><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" width="10"
height="1"></td><td width="100%">
If you do not agree to these terms, click on the back
button of your browser and exit this adult category page.
</td><td><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" width="10"
height="1"></td></tr></table></div><table cellpadding="0"
cellspacing="0" border="0" width="100%"><input type="hidden"
name="MfcISAPICommand" value="AdultSignIn"><input type="hidden"
name="ru"
value="http://cgi.ebay.com:80/ws/eBayISAPI.dll?ViewItem&item=5647416578"></table><div><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" width="1"
height="10"></div><table cellpadding="0" cellspacing="0"
border="0"><tr><td><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" width="10"
height="1"></td><td nowrap="true"><input name="Submit" type="submit"
value="Submit"></td><td><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" width="10"
height="1"></td><td><img
src="http://pics.ebaystatic.com/aw/pics/tbx/s.gif" width="10"
height="1"></td></tr></table></form></div></form><br /><br /><table
border="0" cellpadding="0" cellspacing="0" width="100%"><tr><td
class="pipe"><img src="http://pics.ebaystatic.com/aw/pics/s.gif"
width="1" height="10" /><br /><a
href="http://pages.ebay.com/community/aboutebay/?ssPageName=f:f:US">About
eBay</a> |
<a
href="http://www2.ebay.com/aw/marketing.shtml?ssPageName=f:f:US">Announcements</a>
|
<a
href="http://pages.ebay.com/securitycenter/?ssPageName=f:f:US">Security
Center</a> |
<a
href="http://pages.ebay.com/help/policies/hub.html?ssPageName=f:f:US">Policies</a>
|
<a
href="http://pages.ebay.com/sitemap.html?ssPageName=f:f:US">Site
Map</a> |
<a
href="http://pages.ebay.com/help/index.html?ssPageName=f:f:US">Help</a></td></tr><tr><td
height="4"><img src="http://pics.ebaystatic.com/aw/pics/s.gif"
width="1" height="1" /></td></tr><tr><td bgcolor="#CCCCCC"
height="1"><img src="http://pics.ebaystatic.com/aw/pics/s.gif"
width="760" height="1" /></td></tr><tr><td height="4"><img
src="http://pics.ebaystatic.com/aw/pics/s.gif" width="1" height="1"
/></td></tr><tr class="help" valign="top"><td
class="navigation">Copyright � 1995-2005 eBay Inc. All Rights
Reserved. Designated trademarks and brands are the property of their
respective owners. Use of this Web site constitutes acceptance of
the eBay
<a
href="http://pages.ebay.com/help/policies/user-agreement.html?ssPageName=f:f:US"
target="helpwin" onClick="return openHelpWindow(this.href);">User
Agreement </a> and
<a
href="http://pages.ebay.com/help/policies/privacy-policy.html?ssPageName=f:f:US"
target="helpwin" onClick="return openHelpWindow(this.href);">Privacy
Policy</a>.<br /><img src="http://pics.ebaystatic.com/aw/pics/s.gif"
width="1" height="10" /></td></tr></table><script
src="http://include.ebaystatic.com/js/e437/us/ebayfooter_e4373us.js">
</script><table border="0" cellpadding="0" cellspacing="0"
width="100%"><tr><td height="10"><img
src="http://pics.ebaystatic.com/aw/pics/s.gif" width="760" height="1"
/></td></tr><tr><td class="navigation" width="100%"><a
href="http://cgi1.ebay.com/aw-cgi/eBayISAPI.dll?TimeShow">eBay
official time</a></td></tr></table></body>
<script language="JavaScript">
<!--
window.open = SymRealWinOpen;
//-->
</script>
</html><!--Generated by eBay toolbox, File id: AdultSignIn-->
////////////////////////////// end EXACT html
It is loaded from here
http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=5647416578
If there is no cookie set from recently clicking the submit button in
the above HTML, then a login window appears before the above HTML.
The code works for the login window.
The save to file code looks like this:
void utils::GetTheSource(TCppWebBrowser *bro, AnsiString filename)
{
try{
if(FileExists(filename))
DeleteFile(filename);
}
catch(...)
{
}
IHTMLDocument2 *HTMLDocument;
IPersistFile *PersistFile;
try
{
bro->Document->QueryInterface(IID_IHTMLDocument2,
&((void*)HTMLDocument) );
HTMLDocument->QueryInterface(IID_IPersistFile, &((void
*)PersistFile));
PersistFile->Save(WideString(String(filename)), true);
PersistFile->Release();
HTMLDocument->Release();
}
catch(...)
{ // GAMBIT: I have seen your post that catch(...) is not good
// but have not yet made the code adjustment! Thanks
}
}
Some quick questions:
What would be a file name to use that would avoid the Location
possibility you mentioned?
Can I use something like TXMLDocument instead of saving the page to
file in order to determine if PAGE B or PAGE C was loaded? I actually
don't know what TXMLDocument does but was curious if something else
would determine the document.
Thanks,
Caleb
Re: Gambit TCppWebBrowser / IHTMLDocument2 / form->submit() problem
Author: caleb
Date: Thu, 29 Dec 2005 19:04
Date: Thu, 29 Dec 2005 19:04
13 lines
1534 bytes
1534 bytes
Caleb <nospam@nospam.net> wrote: >On Wed, 28 Dec 2005 01:06:52 -0800, "Remy Lebeau \(TeamB\)" ><no.spam@no.spam.com> wrote: >>Possibly. The URL of the current page is effected by the location of the >>file. When submitting a form, the form has to specify where it is to be >>submitted to. Most HTML developers do not use full URLs for that location, >>which means that the location the form will be submitted to is relative to >>the source URL of the file that contains the form. Thanks Gambit for sharing your experience and knowledge. Not saving to file worked.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads