Fill in web page search box and get resulting web page via code?

Hi all,
    I have a web page:

http://www.national.com/mpf/CO/COP8ACC5.html

and I am wondering how I could simulate entering a value in the search text 
box, pressing search and then getting the resulting web page so I can 
process the information?

I can process the info already if I manually get the source of the resulting 
web page, but not how to get the page automatically via programming.

I have access to Delphi 5 and Delphi 2007 Win32 if this helps...

Thanks in advance,
Cheers,
Paul.

"The plastic veneer of civilization is easily melted in the heat of the
moment" - Paul Nicholls.
paulfnicholls@gmail.NOSPAM.com

Remove ".NOSPAM" to reply.
0
Paul
11/26/2008 12:27:04 AM
embarcadero.delphi.win32 2183 articles. 0 followers. Follow

4 Replies
1335 Views

Similar Articles

[PageSpeed] 34

"Paul Nicholls" <paul_nicholls@hotmail.com> wrote in message 
news:47864@forums.codegear.com...
> Hi all,
>    I have a web page:
>
> http://www.national.com/mpf/CO/COP8ACC5.html
>
> and I am wondering how I could simulate entering a value in the search 
> text box, pressing search and then getting the resulting web page so I can 
> process the information?
>
> I can process the info already if I manually get the source of the 
> resulting web page, but not how to get the page automatically via 
> programming.
>
> I have access to Delphi 5 and Delphi 2007 Win32 if this helps...
>
> Thanks in advance,
> Cheers,
> Paul.
>
> "The plastic veneer of civilization is easily melted in the heat of the
> moment" - Paul Nicholls.
> paulfnicholls@gmail.NOSPAM.com
>
> Remove ".NOSPAM" to reply.

I also have access to Synapse internet classes too if this is easier?
cheers,
Paul
0
Paul
11/26/2008 12:28:14 AM
"Paul Nicholls" <paul_nicholls@hotmail.com> wrote in message 
news:47864@forums.codegear.com...

>    I have a web page:
>
> http://www.national.com/mpf/CO/COP8ACC5.html
>
> and I am wondering how I could simulate entering a value
> in the search text box, pressing search and then getting the
> resulting web page so I can process the information?

You need to look at the search page's HTML to see what form fields are 
actually present, and then send an HTTP request directly to the page that 
the search form submits to and read the response back.  For example, if you 
were using Indy's TIdHTTP component, it would look something like this:

{code}
var
    HTML: String;
begin
    HTML := 
IdHTTP1.Get('http://www.national.com/JS/searchDocument.do?textfield=' + 
TIdURI.URLEncode('the search text here'));
end;
{code}

-- 
Remy Lebeau (TeamB)
0
Remy
11/26/2008 1:27:08 AM
"Paul Nicholls" <paul_nicholls@hotmail.com> wrote in message 
news:47867@forums.codegear.com...

> I also have access to Synapse internet classes too if this is easier?

Synapse has a THTTPSend client class, for example:

{code}
var
    HTML: TStringList;
begin
    HTML := TStringList.Create;
    try
        // HttpGetText() uses THTTPSend internally...
        HttpGetText('http://www.national.com/JS/searchDocument.do?textfield=the%20encoded%20search%20text%20here', 
HTML);
    finally
        HTML.Free;
    end;
{code}

-- 
Remy Lebeau (TeamB)
0
Remy
11/26/2008 1:35:34 AM
Thanks for the handy replies Remy, I will see how I go :)
You supply loads of help on these forums, very much appreciated :-)
cheers,
Paul
0
Paul
11/26/2008 1:56:47 AM
Reply:

Similar Artilces:

Do not get expected WEb page on secondary
netware 6.5 sp2 Have setup a web page on a seconary IP address Load appache with the following command line LOAD ADDRESS SPACE = CSMI APACHE2 -f SYS:APACHE2\CSMI\SERVER\HTTPD.CONF Where HTTPD.CONF is set up to Listen 172.16.212.2:80 which is a secondary ip address A display secondary ipaddress at the server lists the seconary ipaddress I can ping the secondary ip address from the client in Remote manager using IP Address management the secondary IP addresses are not listed When I attempt to brose to the HTTP://172.16.212.2 address I do not see the web page I...

page code file not resolving page web controls Visual Web Developer 2008
Hi, my page code file has stopped resolving my page controls, this is a bit of a headache as I am not able to verify my variables properly! anyone encountered this?   you might want to check if your code file is referenced in the .aspx file using "CodeFile=" and not "CodeBehind=". the class must also be declared as partial. if this does not work, you can try to declare a protected variable in your code file with the exact same name for every control you want to manipulate and see if it matches at runtime (the 1.1 way). e.g.: protected DropDownList MyDDL...

how to navigate the url page in one web application page to another web application page
In my project one solution have 2 web apllications in one folder.like 1.webapplication1 2.webapplication2. in firt webapplication1 i created one aspx page like sample.axpx. in second webapplication2 i created one aspx page like sample2.aspx... in sample2.aspx page have hyperlinl. I need to navigate this hyperlink when i click it go to the sample.axpx. how can i write navigate url for this...help me. ..thanks  As i understand u, you need Multi Project soltuionsee this link, http://community.rainbowportal.net/blogs/jonathans_rainbow_blog/archive/2006/02/19...

i web page referencing another web page
Can one web page reference a control on another web page? EX. a page is brought up with a number of textbox controls. Using a hyperlink one can pop up a nother page with the calendar control. Select a date from the calendar control and place the value back in the previous page. Can this be done and how? Use a Page.RegisterClientScriptBlock to open a window, with a javascript string like this: "<script language=Javascript>window.open('my_url.aspx','window_name','left=100,top=100,width=200,height=500,toolbar=no,scrollbars=yes,resizable=yes');</script>" Then you can s...

parent web page --child web page
Dear Developers , how to get values child web page values to parent web page ? For the example , I have parent Employee Address. and child Page have employee personal address.. when i access the Parent page , there is no employee address means ..child page pop rises , after complete child page then only , i can access the parent page.. how to i do .. Thanking u raja Thanks,Regards,Rajamsrasa@yahoo.com...

link a web page to another web page?
I have a web page with my banner and buttons for my site on it. I want to add this to all of my pages. Instead of copying a pasting that to every page. Is there a way i can link the pages to the banner page? Thanx use ascx?:) Or you could create a template page. That is: Create a page inherited from System.Web.UI.Page and place your banner and buttons in this and then have all your other pages inherit tis custom page instead of System.Web.UI.Page. ...

Web page opens second web page, how does first page know when the second one closes?
I have an app written in ASP.NET where one of the web pages opens up a web page in a second window.  When this second web page closes, the first web page needs to update its data.  How do you do this? You can have the child window call a parent method when the user clicks a link to close it. Otherwise, you'd have to set up polling to check for the existence of the child, and refresh if it doesn't exist. Please Mark As Answer posts that helped you."If we learn from our mistakes, I should be brilliant by now." Thanks, this gives me part of the answer...

want to allow create new web page and edit exiting web page using my web application?
 I am using asp.net 2.0 VS 2005 pro edition. I want to make web application(web form)  where my uses can go and create simple web page or can create page , so then can add page/edit features let me know if some one know , how to do this , any idea, I want to allow my user to create web page and edit web page using my web applications. some one tell me how to do that Note : I dont want to use HTMl editor or any third party software tools thank you maxmax Hello, There is many ways you can implement this. And to build your application you to need to understand the exact ou...

All web pages hang on web server when one of the web pages calls a run away sql query
Hi: We have a Windows 2003 dedicated web server running the .NET Frameworks 1.0 and 2.0.  We have a SQL Server cluster running SQL Server 2000.  Unfortunately, we do not have a test environment.  I have 2 .NET web sites in production.  My coworker has a voting .NET web page using AJAX on the same server.  The coworker wrote a query that was not indexing properly and when the page fired the query...the cluster went to almost 100% utilization.  My two web pages would hang and show a blank white page on the default.aspx.  Neither of m...

How to search a web site content (similar to google searching a web page)
Hi ,  Can any one help me, in finding solution for searching a web site.  I have a search functionality implement in my application, user should able to mine details from the web pages and a small description should also be show(similar to google search result)  *  i have come across some solution mentioned below, which is not elegant, any other method to get this done    Dim sVirtualPath As String = Request.Url.ToString.Substring(0, Request.Url.ToString.LastIndexOf("/") + 1) Dim sPageHTML As String = GetPage(sVirtualPath & SEARCH_PAGE) ...

activating new web page from another web page
Hello all. I'm trying to activate a web from from another web form. I meen, something like: public class RptReq : System.Web.UI.Page { private void Page_Load(object sender, System.EventArgs e) { // Put user code to iniialize the page here Report rpt = new Report(); rpt.Page_Load(sender,e); } //Web Form Designer generated code } Report is another class in my name space. Can I get the right way to do it? Best regards to all. Shlomi <p><a target="_blank" href="sdfdf.asp">rdfgfdg</a></p> ...

How to open another web page from one web page
Hi, I am writing an asp.net(C#) 2.0 web page with a link to another web page by clicking a button control on the page, so how can I link it in the codes? I cannot access another aspx page class within the current aspx page class.  Thanks If you need to re-direct the user to another page after pressing your Button, then use the Response.Write method like so: Response.Redirect("~/Default.aspx")Thanks, EdMicrosoft MVP - ASP/ASP.NET 1) Response.Redirect( "Destination PageName");2) Response.Transfer("Destination PageName");3) Hyperlink(  set Url="...

How to store in a web page dynamic data in a web Page ?
Hi,I have 1 ListBox containing :1 ~ MACHINE A ~ 0 ~ 23 ~ R2 ~ MACHINE B ~ 4 ~ 477 ~ R3 ~ MACHINE C ~ 2 ~ 78~ R4 ~ MACHINE D ~ 9 ~ 76~ TI should have :1 ~ MACHINE A2 ~ MACHINE B3 ~ MACHINE C4 ~ MACHINE DThis ListBox is populated by a DataBase => So the line numbers isn't known for advance.How to store in ASP.NET these values (0, 23, 4, ...) ? I need these values into the web page because I need them for JavaScrip functions. Do List like HiddenFields exist ?Thanks for your tips.David. i am bit confused by your question.. can you explain it once more"Mark as ...

how to open a web page in form of a popup web page
Hello, I have two web pages, let say. Page A : With a Button on it. PAge B: with some info. Now I need to: When I click on the Button of page A.Page B must open in a pop up window.  I can do this but problem is this when I clicked on the button for first time it does not show me any thing and when I clicked on the button for second time then It shows me Page B .My code is as follow:  1 protected void Page_Load(object sender, EventArgs e) 2 { 3 if (!this.Page.IsPostBack) 4 { 5 6 } 7 else 8...

Web resources about - Fill in web page search box and get resulting web page via code? - embarcadero.delphi.win32

List of aircraft accidents and incidents resulting in at least 50 fatalities - Wikipedia, the free encyclopedia ...
Two hundred of these occurrences have involved at least 100 fatalities, and 31 have had more than 200 fatalities. Between 1923 (the first year ...

Top Immigration Officials Describe Border Chaos Resulting From Admin's Amnesty Policy - YouTube
Sen. Sessions hosted a press conference today with top officials from two unions that represent U.S. immigration law enforcement agencies. ICE ...

Police officer charged with multiple driving offences resulting from Geelong crash
A male police officer has been charged with several driving offences, including driving while on drugs.

Phillip Hughes: Doctors reveal condition 'incredibly rare' with only one other case resulting from cricket ...
Doctors say Phillip Hughes died from a very rare, very freakish injury after a bouncer split one of the main arteries feeding blood to his brain. ...

Mark Chand, Duchess of Cornwall's brother, dies in New York after serious head injury resulting from ...
The brother of Camilla, Duchess of Cornwall, has died after sustaining a serious head injury following a fall in New York, British royal officials ...

Target Canada Prices Resulting In Consumer Backlash: Analyst
Market analysts are turning sour on Target’s Canadian expansion, with one saying the retail chain appears to be facing a backlash from consumers ...

Apple being sued over iMessage bug resulting in undelivered text messages to Android users
... , iOS Continue reading more about AAPL Company and iOS at 9to5Mac . What do you think? Discuss "Apple being sued over iMessage bug resulting ...

Prank Resulting In 2 NFL GMs Talking To Each Other Results In Up To 5 Years Of Prison, $500k Fine
And no one knows what horror will erupt when the Bills GM gets on the phone. Continue reading » Follow Above the Law on Twitter or become a ...

Verizon will honor upgrades with unlimited data resulting from system glitch
Following a weekend system glitch that let customers with unlimited data plans receive upgrade pricing on handsets, Verizon has released a statement ...

Blockbuster iPhone 3GS sales resulting in constrained inventories
After selling 5.2 million iPhones in fiscal Q3, including a million units that sold in the first three days, Apple has announced being "unable ...

Resources last updated: 12/1/2015 3:10:20 PM