Multiple Submit Actions (Using Images) within the

  • 19 years ago

    I'm trying to pass an username and password saved in hidden fields to the next asp page.  The problem is that in my form, I have three different images used for my submit "buttons" and I'm trying to direct the user to a different page depending on which image is chosen.  The following code seems to work in Internet Explorer but nothing happens in Netscape 4.x
    Could you provide some insight as to why the different "actions" will not work in Netscape?


    PS -- I know that setting up three different forms with the different actions will work, but it seems a little excessive to have to use three different forms repeating the hidden fields within each.


    Thanks for your help,
    Brian
    [email protected]



    Problem Code:


    <FORM NAME="myForm" METHOD="POST">


    <INPUT TYPE="Hidden" NAME="Username" VALUE="<%=myUserName%>">
    <INPUT TYPE="Hidden" NAME="Password" VALUE="<%=myPassword%>">


    <INPUT TYPE="IMAGE" SRC="Images/Buttons/Go.gif" onclick="javascript:document.myForm.action=’ASP1.asp’; document.myForm.submit(); return true;">ASP1<BR>


    <INPUT TYPE="IMAGE" SRC="Images/Buttons/Go.gif" onclick="javascript:document.myForm.action=’ASP2.asp’; document.myForm.submit(); return true;">ASP2<BR>


    <INPUT TYPE="IMAGE" SRC="Images/Buttons/Go.gif" onclick="javascript:document.myForm.action=’ASP3.asp’; document.myForm.submit(); return true;">ASP3<BR>


    </FORM>

  • 19 years ago

    hi
    what better place could u have come to for a solution..
    i have an article explaining how to get this done..right here on this site itself..
    check the following article.. i think this is what you are looking for


    http://www.developerfusion.com/show/2067/


    do reply in case this doesnt solvev the problem


    bye

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“In theory, theory and practice are the same. In practice, they're not.”