in reply to Re^3: Using drop down boxes in a CGI script
in thread Using drop down boxes in a CGI script

Do you think the drop down box is not writing a value to the text file because I am using the CGI.pm dropdown box and normal html? From what I have read, CGI.pm carries out it's own parsing, so there is no need for my parse subroutine? Thanks
  • Comment on Re^4: Using drop down boxes in a CGI script

Replies are listed 'Best First'.
Re^5: Using drop down boxes in a CGI script
by jethro (Monsignor) on Jul 30, 2008 at 13:07 UTC
     -name => '$obj' This won't do what you intent. Single quotes (') don't interpolate, so the name will be '$obj', not the value of $obj. Either use double quotes or simply drop the quotes altogether: -name => $obj

     $html .= start_form I don't think this belongs here. You don't want to start a new form inside another form (the one created with add_record and build_record_page).

    If it still doesn't work, check out the html your code generates. Either with a browser (every browser has a function to show you the html) or something like this:

    open(BUG,'>>/tmp/testoutput'); print BUG $html close(BUG);
    Then you can analyze the html to see what is wrong or missing or too much.

    Sorry, I didn't read your code from beginning to end. So I don't have the least idea what parse does or should do. It probably is easier if you tell me (or start a new thread if that question is independent of your dropdown menue question).

      Thanks for your reply. I noticed that I had put single quotes around the variable a bit earlier on and now it works.