How do I get a return value from list item after click?


I am using CGI - PERL in writing a simple html page as perl / CGI.

I am using the below list:

<ul class="menu">
    <li class="top"><a class="top_link"><span>System</span></a>
         <ul class="sub">
               <li><a href="#">1- Administration</a></li>                  
      <li><a href="#">2- ..............</a></li>
                <li><a href="#">3- ..............</a></li>
                <li><a href="#">4- ..............</a></li>
                <li><a href="#">5- ..............</a></li>

Now the question is:
I want to now which item is clicked in the same page. So if I click 1- Administration, I do need to get a value for use in a condition statement in the same page. HOW? If there is a loop, it will be great.

Who is Participating?
wilcoxonConnect With a Mentor Commented:
If you mean that you need to select the value from the drop-down and then modify the page in some way without submitting the form, you can't use perl to do that part.  Perl is server-side so it can only get values or do things when the form is submitted or a link is clicked.  You need to use JavaScript in order to manipulate a page within the browser.  You can use perl/CGI to serve/process pages that use JavaScript (the two are not incompatible) - perl just works on the back end (when the form/request is being processed by the server) while JavaScript works on the front end (inside the browser).
nabilhammoudAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.