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

Hello,

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


nabilhammoudAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wilcoxonCommented:
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).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nabilhammoudAuthor Commented:
moderate
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.