🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.internet.web
3 messages
3 total messages Started by Caleb Tue, 06 Dec 2005 14:13
Submit Form From TCppWebBrowser (ebay)
#913
Author: Caleb
Date: Tue, 06 Dec 2005 14:13
19 lines
1666 bytes
Hello:

On most ebay pages the submit form logic (below) works.
On the ebay page (http://cgi5.ebay.com/ws2/eBayISAPI.dll?ReviseItem&Item=)
for adding descriptions, there is a confirmation page that
shows the item number and continue button. This page is not
working as desred.  it has the foloowing code in the html:

<input type="image" name="ButtonCatch" src="http://pics.ebaystatic.com/aw/pics/s.gif" width="1" height="1" border="0" onclick="
										if( syiForm ) syiForm.buttonClicked 
= 'ButtonContinue';"></td><td valign="top"><input 
name="ButtonContinue" id="ButtonContinue" type="submit" 
value="Continue" onclick="if( syiForm ) syiForm.buttonClicked = 
this.name;">

Any clues as to how to get the submit form logic to work?

Submit form logic: http://groups.google.com/group/borland.public.cppbuilder.internet/msg/49415070c698a11c?hl=en&
Re: Submit Form From TCppWebBrowser (ebay)
#915
Author: Caleb
Date: Thu, 08 Dec 2005 10:01
32 lines
1831 bytes
"Caleb" <nospam@nospam.net> wrote:
>
>Hello:
>
>On most ebay pages the submit form logic (below) works.
>On the ebay page (http://cgi5.ebay.com/ws2/eBayISAPI.dll?ReviseItem&Item=)

There may be a problem with releasing objects.  Please
look at the code below and let me know if this is the case.
The form CAN be submitted if the following code is omitted.
I think something(s) need to be released.  Thanks for any
help.

  TCppWebBrowser * CppWebBrowser1 = WB;
  IHTMLDocument2 *HTMLDocument;
  IPersistFile *PersistFile;

  try
  {
     CppWebBrowser1->Document->QueryInterface(IID_IHTMLDocument,
     &((void*)HTMLDocument) );
     HTMLDocument->QueryInterface(IID_IPersistFile, &((void *)PersistFile));
     PersistFile->Save(WideString(String(filename)), true);
  }
  catch(...)
  {
  }

This code is part of logic used for seeing which page loaded.
Is there a better way to examine the contents of the loaded
page to see which page loaded (ie login accepted or login prob)?
Re: Submit Form From TCppWebBrowser (ebay)
#916
Author: Caleb
Date: Thu, 08 Dec 2005 10:23
55 lines
2659 bytes
"Caleb" <nospam@nospam.net> wrote:
>
>"Caleb" <nospam@nospam.net> wrote:
>>
>>Hello:
>>
>>On most ebay pages the submit form logic (below) works.
>>On the ebay page (http://cgi5.ebay.com/ws2/eBayISAPI.dll?ReviseItem&Item=)
>
>There may be a problem with releasing objects.  Please
>look at the code below and let me know if this is the case.
>The form CAN be submitted if the following code is omitted.
>I think something(s) need to be released.  Thanks for any
>help.
>
>  TCppWebBrowser * CppWebBrowser1 = WB;
>  IHTMLDocument2 *HTMLDocument;
>  IPersistFile *PersistFile;
>
>  try
>  {
>     CppWebBrowser1->Document->QueryInterface(IID_IHTMLDocument,
>     &((void*)HTMLDocument) );
>     HTMLDocument->QueryInterface(IID_IPersistFile, &((void *)PersistFile));
>     PersistFile->Save(WideString(String(filename)), true);
>  }
>  catch(...)
>  {
>  }
>
>This code is part of logic used for seeing which page loaded.
>Is there a better way to examine the contents of the loaded
>page to see which page loaded (ie login accepted or login prob)?


OK, I think I have the source of the problem, but not the solution.

Added:

     PersistFile->Release(); 
     HTMLDocument->Release(); 

However, as I mentioned the submit form logic is working
in one program but not the one with the logic above for
seeing which page loaded.

The logic above saves the page to afile.  If that file is opened
in the broweser, it shows the form that is being submitted,
but if I manually click the button to submit form, the browser
shows the same "page cannot be displayed" message and the 
browser's address is "D:\ws\eBayISAPI.dll".

So how, if I save the browser to a text file, do I prevent
the browser address from changing to the local file name?
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