Using Images instead of buttons in a form

Results 1 to 2 of 2

Thread: Using Images instead of buttons in a form

  1. #1
    Kevin Guest

    Default Using Images instead of buttons in a form

    I have a form where I use images instead of buttons - however on one form I have three buttons, each directing the user to a different page. When I used the submit buttons everything worked e.g.<BR><BR>&#060;input name="action" type="submit" value="page1"&#062; <BR><BR>I then redirected the user to the page using "request.form("action") to find out what button the user clicked on.<BR><BR>However, when I use images, the POST (or GET) string changes to page1.x=1, page1.y=2 etc, (instead of action = page1). <BR><BR>I have tried to search through the POST string for page1.x or page1.y to no success - can any one suggest a method of doing this, or a work-around?<BR><BR>Thanks,<BR><BR>Kevin.

  2. #2
    Join Date
    Dec 1969

    Default RE: Using Images instead of buttons in a form

    Kev,<BR><BR>I use javascript to do this.<BR><BR>function RedirectPage(theform)<BR>}<BR>var pageName = theform.action.value;// returns (Page1)<BR>var loc = "some.asp?";<BR>loc += "action=" +pageName;<BR>location.href = loc; \this will load the page<BR>}<BR><BR>&#060;input name="action" type="submit" value="page1" onclick="javascript:RedirectPage(this.form)"&#062; <BR><BR>if this does not work let me know via forum<BR><BR>mike

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts