Use two buttons for my form.

Posted on 2006-04-12
Last Modified: 2010-04-06
I have a web-page with two <select> lists. I would like an extra button for the first <select> that sends data to some other page. It already has a (hidden) submit button as you will see in the code. This is in Perl.

print "<form method=post>"
print "<select size=6 id=a name=sel2 onchange=\"if(this.selectedIndex != -1) submit();\">";
print "<option>";
print "</select><br>";

#print "<input type=submit id=gv2 value=Go>";
print "</form></td><td align=center>-</td><td>";
print "<form method=post><select name=trig_list size=6>";
      print "<option>";
print "</select><br><input type=submit value=\"<<\"></form>";
Question by:n4narik
    LVL 2

    Expert Comment

    Make it type button and submit the form using script in onclick event of the button
    LVL 1

    Accepted Solution

    Try this:

    function dosubmit(b)
     if (b==1)
    Remember to name the form f1.  The link is: javascript:void(dosubmit(1))

    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Suggested Solutions

    Shoutout to Emily Plummer ( for giving me this article! She did most of it, I just finished it up and posted it for her :)    Introduction In a previous article (http://www.experts-exchang…
    Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
    Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now