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

Re: Pass variable values from HTML to CGI using "onclick"

by sundialsvc4 (Abbot)
on Jul 07, 2013 at 15:31 UTC ( #1042985=note: print w/replies, xml ) Need Help??

in reply to Pass variable values from HTML to CGI using "onclick"

I suggest that you start the page in a browser while running a debugger such as FireBug.   This will allow you to do two very useful things:

  1. You can set breakpoints in the JavaScript code, to see what it is doing and where/when it is being called.
  2. When the page finally submits something to the host, you can see the actual GET/POST that it sent.   Never Assume.™

You don’t say whether the JavaScript code is known-good, so let’s assume, until demonstrated otherwise, that it is the actual source of the bug.   Let’s assume that the real problem is that the JavaScript either isn’t passing mysample, or that its value is empty.   Exercise the code and use FireBug to find the actual POST.   If you can see the correct value being passed, only then do you know (but now, you know), that the error is in the Perl software.

  • Comment on Re: Pass variable values from HTML to CGI using "onclick"

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1042985]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2018-06-22 20:41 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (124 votes). Check out past polls.