Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

How to handle the option part

by Anonymous Monk
on Apr 20, 2003 at 17:51 UTC ( [id://251851]=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I want to get data from database by LWP::Simple::get. Regular one page only show up 20 items, My data total has 402 items. I use:
$mydata=get('http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?db=protein& +cmd=search&term=RGS');
I only can get 20 items. The source code has options from 10,20,100,200,500. By hand if you choice SHOW=500, you can get 402 items. and then the URL is: http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?CMD=search&DB=protein But if you use above URL you will get nothing. The source code is:
&nbsp;Show:&nbsp;<select name="dispmax" onChange="form.dispmax1.select +edIndex=selectedIndex;"><option>5</option> <option>10</option> <option selected>20</option> <option>50</option> <option>100</option> <option>200</option> <option>500</option> </select>
What I can do about that? Please help! Thanks in advance!

Replies are listed 'Best First'.
Re: How to handle the option part
by arturo (Vicar) on Apr 20, 2003 at 18:44 UTC

    It should be pretty simple; note that the name attribute on the select is dispmax. So that's the value you need to send to the CGI that handles the form submission. Submitted variables, when using a GET request (as you are here) are separated by ampersands and take the form name=value (if that's confusing you, just look a the URLs you are already using for an example), so if you simply add &dispmax=500 to the URL that you are fetching, that ought to do it.

    P.S. This is more of an HTML question than a Perl question. You might want to try W3C Schools to learn more about HTML.

    HTH

    If not P, what? Q maybe?
    "Sidney Morgenbesser"

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://251851]
Approved by jonnyfolk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (3)
As of 2024-04-20 13:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found