in reply to Re: display new options based on checkbox inputs
in thread display new options based on checkbox inputs

Hello Monks, I did try to read through the CGI Programming Q&A, but still i am not able to link between perl and java script. my new sample code looks like this :
if($flag eq '1'){ my $pr= "<print>IDIDIT</print>";print "<script>$pr</ +script>";}
Cna u please help me as i am new to perl.

Replies are listed 'Best First'.
Re^3: display new options based on checkbox inputs
by marto (Cardinal) on Jul 07, 2014 at 09:07 UTC

    What are <print> tags? What do you expect this code to do? Consider solving this problem in HTML/JavaScript before doing anything in Perl, and learning the basics of HTML, JavaScript and CGI.

      All I am trying to do in input new data based on the checkbox clicked. So i thought i will refresh the code to get to display new textboxes...
      when check box 1 is clicked, Input for checkbox1 [ ] -------------------------- [Submit] when checkbox1 and checbox2 is clicked, Input for checkbox1 [ ] Input for checkbox2 [ ] ----------------------- [Submit]
      Any sample code will be of great help...
        Include those input fields in your HTML source, hide them by default (style="display: none" or so), and use Javascript to unhide/rehide them as the corresponding checkboxes are clicked.
Re^3: display new options based on checkbox inputs
by Anonymous Monk on Jul 07, 2014 at 09:23 UTC
      All I am trying to do in input new data based on the checkbox clicked. So i thought i will refresh the code to get to display new textboxes...
      when check box 1 is clicked, Input for checkbox1 [ ] -------------------------- [Submit] when checkbox1 and checbox2 is clicked, Input for checkbox1 [ ] Input for checkbox2 [ ] ----------------------- [Submit]
      Any sample code will be of great help...

        All I am trying to do in input new data based on the checkbox clicked. So i thought i will refresh the code to get to display new textboxes... Any sample code will be of great help...

        I already posted links to samples, if these aren't enough, ask better questions (not just repeat stuff you already said)