http://www.perlmonks.org?node_id=1092167


in reply to display new options based on checkbox inputs

If you want the input for checkbox to be displayed when the checkbox is clicked without reloading the page, you have to implement this logic on the client side, i.e. in JavaScript, not Perl.
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
  • Comment on Re: display new options based on checkbox inputs

Replies are listed 'Best First'.
Re^2: display new options based on checkbox inputs
by Anonymous Monk on Jul 03, 2014 at 13:26 UTC
    Thanks for it, i am pretty much new to perl, and not sure how to pull js here.. any examples will be great...

      Stop using CGI to generate HTML. It's just more work than it's worth. Either switch to a modern web framework (see Dancer) or if you insist on using CGI use a templating system (Template, HTML::Template) to keep your perl code seperate from your HTML/CSS/JS code. Essentially make an HTML/JavaScript version that does what you want to do, once working use this as a template.

        but how do we validate the input???