User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Perl section within the Software Development category of DaniWeb, a massive community of 397,851 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,341 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Perl advertiser:
Views: 1726 | Replies: 3
Reply
Join Date: Jul 2007
Posts: 2
Reputation: jvisprime is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
jvisprime jvisprime is offline Offline
Newbie Poster

Question How to open HTML page in a browser with specific options selected in drop-down boxes?

  #1  
Jul 9th, 2007
How to open HTML page in a browser with specific options selected in drop-down boxes?

Hi Everybody,

The task that I have is from Perl script to open HTML page in a browser with specific options selected in drop-down boxes and edit fields using POST method.

The good example of such a page would be http://stockcharts.com/h-sc/ui. So if I do that manually:

I open the link in a browser,
type Symbol: $COMPQ,
select Chart Attributes\Range: 3 Month,
select Overlays\first row\first column: Exp Mov. Avg,
type Overlays\first row\second column: 5,
click on Update button.

The page gets updated according with the specified parameters.

So how can I get the same result using Perl?

I tried to search for the solution, but haven’t found anything directly related to my problem. So please point me to the source if the answer already exists somewhere else.

Thank you,

J
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Mar 2006
Posts: 591
Reputation: KevinADC is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 30
KevinADC's Avatar
KevinADC KevinADC is offline Offline
Posting Pro

Re: How to open HTML page in a browser with specific options selected in drop-down boxes?

  #2  
Jul 10th, 2007
You will want to look into WWW::Mechanize if you intend to use perl.

http://search.cpan.org/author/PETDAN...W/Mechanize.pm
http://search.cpan.org/author/PETDAN...e/Examples.pod
http://search.cpan.org/author/PETDAN...hanize/FAQ.pod


There are also some modules written for gathering stock data.

http://search.cpan.org/~hampton/Fina...nance/Quote.pm

I have never used any of the above modules so I can't really help much more than I already have.

this will most likely be very difficult for you unless you already have solid perl experience and know how to install the modules.
Reply With Quote  
Join Date: Jul 2007
Posts: 2
Reputation: jvisprime is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
jvisprime jvisprime is offline Offline
Newbie Poster

Re: How to open HTML page in a browser with specific options selected in drop-down boxes?

  #3  
Jul 10th, 2007
Thank you, KevinADC.

I will look through the sources you suggested. Though my goal is not to gather stock data. The web page I mentioned was just a convenient public domain example. I am not an experienced Perl programmer and my goal is to learn how to operate with the HTML/scripts in the web browser, not just data collecting/processing.

I appreciate it anyway.

J
Reply With Quote  
Join Date: Jul 2007
Posts: 19
Reputation: chandrag is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
chandrag chandrag is offline Offline
Newbie Poster

Help Re: How to open HTML page in a browser with specific options selected in drop-down boxes?

  #4  
Jul 19th, 2007
Hi all.

Can i open the web page through perl?
I get URL as a result in my perl code.
but, ofcourse, it is displayed in command prompt as i'm using windows.
I need that web page to be displayed directly.
can i do it?

i hope somebody can help with this.

thank you
chandrag
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb Perl Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the Perl Forum

All times are GMT -4. The time now is 8:15 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC