Re: ASP and form submission image cont..

by "Cyanide _7" <leo7278(at)hotmail.com>

 Date:  Sun, 16 Jan 2000 02:49:34 CST
 To:  pbabcock(at)bgsgroup.com
 Cc:  hwg-languages(at)hwg.org
  todo: View Thread, Original
a while ago i mentioned just testing which image was clicked. well i did a 
little tinkering and found that the form doesn't pass the image's value, but 
its coords where clicked. you need to test for imageH.x not imageH. try this 
script:

DIM which

IF Request.Form("imageL.x") <> "" THEN
  which = "L"
ELSE IF Request.Form("imageM.x") <> "" THEN
  which = "M"
ELSE IF Request.Form("imageH.x") <> "" THEN
  which = "H"
ELSE
  which = "N" 'N for none
END IF
END IF
END IF
Response.write which & " was clicked"

should be exactlly what you're looking for. - Cyanide_7

>From: "Phil Babcock" <pbabcock(at)bgsgroup.com>
>Reply-To: pbabcock(at)bgsgroup.com
>To: "Mike Taylor" <lonewolf(at)one.net>
>CC: "hwg-languages(at)hwg.org" <hwg-languages(at)hwg.org>
>Subject: Re: ASP and form submission image cont..
>Date: Thu, 13 Jan 2000 16:41:36 -0500
>
>Ok, here is the form.  I need to pass the value of the selected option, ie
>10015827, and be able to determine what input image was clicked or somehow
>pass the character H for imageH, L for ImageM, etc.
>
>
><form name="frmpreviews" action="test.asp" method="post">
><select NAME="cmbPreview">
><option selected value="<%= session("strCurrentPage") %>">Choose a
>Preview</option>
><option value="10015827">Alien</option>
><option value="10015830">Aliens</option>
><option value="10015828">Alien3</option>
></select>
><input type=image align=absmiddle src="images/high.gif" border=0 height=25
>width=50 name=imageH>
><input type=image align=absmiddle src="images/med.gif" border=0 height=25
>width=50 name=imageM>
><input type=image align=absmiddle src="images/low.gif" border=0 height=25
>width=50 name=imageL>
></form>
>
>
>*********** REPLY SEPARATOR  ***********
>
>On 1/13/00 at 4:37 PM Mike Taylor wrote:
>
>->What does your form look like?  I'm curious how the values are being
>->assigned as compared to the ASP page you're submitting this to.
>->
>->Mike
>->
>->On Thu, 13 Jan 2000, Phil Babcock wrote:
>->
>->> Yes, it doesnt work.  When I have:
>->> I get HML displayed because, I assume, it is true that all of these
>images
>->> are there.
>
>
>Phil Babcock
>Lead Web Designer
>BGS Group Inc.
>

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

HWG: hwg-languages mailing list archives, maintained by Webmasters @ IWA