in reply to display new options based on checkbox inputs

In addition to choroba's (++) comment on the need for using javascript -- it appears you do not have an understanding of data flow via the stateless http protocol.

Your code indicates an expectation that the client-side "this.form.submit()" will return control to server-side perl. This is not the case. Please read up on CGI Programming.

        What is the sound of Perl? Is it not the sound of a wall that people have stopped banging their heads against?
              -Larry Wall, 1992

  • 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 07, 2014 at 09:03 UTC
    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.

      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...
        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...