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

Poj I am using two different HTML and CGI files. I would prefer a way to pass the value from HTML to CGI. If you want to understand my problem better, I can paste the entire scripts.
  • Comment on Re^2: Pass variable values from HTML to CGI using "onclick"

Replies are listed 'Best First'.
Re^3: Pass variable values from HTML to CGI using "onclick"
by poj (Abbot) on Jul 05, 2013 at 21:36 UTC
    It was a demo of the html, I put it in a cgi so you see the parameters being sent. Try it with this html page
    <html> <form action="test.cgi" method="post"> <input type="submit" name="action" value="Add"/> <input type="submit" name="action" value="Edit"/> <input type="submit" name="action" value="Delete"/> <input type="hidden" name="hide" value="123"/> </form> </html>
    poj
      Poj, I get you. Add/Delete/Search is calling the cgi, but what I meant is in my CGI file i have 3 functions : sub Add{bla bla} sub Search, sub Delete. My idea was to pass a value so that I could create a condition, something like: If value=0 Add(); else if value=1 Search(); else Delete(); I am new to perl, so please don't mind my syntax. I will appreciate if you could explain how I could link your html values with these functions. Thanks. UPDATE : I just ran the CGI alongwith it. Got that the parameter is getting passed. Thanks Poj!