Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

'submit' a series of form selections

by Anonymous Monk
on Apr 25, 2017 at 12:57 UTC ( [id://1188839]=perlquestion: print w/replies, xml ) Need Help??

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

i am using Perl to construct a web page with a number of dropdown menus. I only want to 'submit' the form once after all the selections have been made. Chrome will not let me paste my source code on this box so I apologize for its absence.

Replies are listed 'Best First'.
Re: 'submit' a series of form selections
by Corion (Patriarch) on Apr 25, 2017 at 13:22 UTC

    Perl only runs on the server, not on the client.

    If you want to solve this problem using only Perl, you will have to (re)show the forms where no selections have been made yet.

    If you want to solve this problem using Javascript, you will have to have your Perl print the appropriate Javascript.

      My program (in Perl) is constructing an HTML file (using a HERE document). The HTML presents the dropdown boxes and submits the selection(s). Right now it is submitting using 'GET' to localhost. I can see the submission string in the URL line but it only has values from one 'submit;...I need the submission string to have a series of values.

        This sounds more like a problem in your HTML and less like a problem with Perl.

        Can you show a short HTML example together with the server-side Perl (each about 20 lines) that we can run to reproduce your situation?

        Maybe you have not given your HTML input elements the name and value attributes?

Re: 'submit' a series of form selections
by choroba (Cardinal) on Apr 25, 2017 at 14:29 UTC
    > Chrome will not let me paste my source code on this box

    What happens when you try?

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
      Chrome returns a page which say (in effect) that some dangerous code has been detected....I had written the example as:
      ...example
      Corion suggested that I needed to use only one form and I removed the first closing </form> and that did the trick. Thanks
        Did you use <code>...</code> tags to mark the code as code?
        ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
Re: 'submit' a series of form selections
by Anonymous Monk on Apr 25, 2017 at 15:44 UTC
    Chrome will not let me paste my answer on this box so I too apologize. :(

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (3)
As of 2024-04-25 23:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found