in reply to drop down menus with CGI/Perl

I'm not sure quite where you are from the standpoint of understanding your way around a CGI application, but the question leads me to believe that you're just starting to get your feet wet. That being the case, I hope the following suggestions get you started in the right direction:

I hope some of this helps. If programming turns out to not be something you're interested in, you're better off finding someone who is interested in it, because the learning curve will quickly put you off if you're just looking for a quick solution. But if you have a desire to learn this stuff, stick around and enjoy. Just don't feel bad when it takes some work learning the art.


Dave

Replies are listed 'Best First'.
Re^2: drop down menus with CGI/Perl
by Utilitarian (Vicar) on May 22, 2009 at 07:36 UTC
    daivdo's response above is good advice, what you appear to want to do is to make change dynamic, this could be done with an AJAX XHtmlRequest, and a rewrite of the results div done in Javascript called by an onchange event handler associated with the drop down menu.

    However to get a feel for the idea, a simple

    <!-- <script language="javascript"> function sortResults(){ var myForm=getElementByID("myForm"); myForm.submit(); } </script> --> <form action="returnResults.pl" id="myForm" method="POST"> <select name="sortBy"> <option value="byDate">Date...</select> <input type="text" name="searchCriteria" value="$WHATEVER WE GOT INITI +ALLY"> </form>
    This will recall the script with a sortBy parameter set, of course it will reload the whole page.

    After you get this method to work, have a look at AJAX for inline changes on a page, again as davido said, knowledge has to be acquired and it's not an instantaneous process, however it's a rewarding one.

    Happy learning ;)