Image Submit Button

Snitz™ Forums 2000
https://forum.snitz.com/forumTopic/Posts/68389?pagenum=1
05 November 2025, 11:10

Topic


Carefree
Image Submit Button
13 March 2009, 01:58


I have a form in which I want to use images as the submit buttons. The x/y coordinates are posted, but the values are not.
Code:
Here's a typical image line:

"<input type=""image"" name=""imgname1"" width=""100"" height=""75"" border=""1"" value=strpd(1) src=""" & strImageURL & strpd(1)& ".png"">" & "</a>" & vbNewLine & _
The form definition line is like this:

"<form name=""imgcap"" action=""googtest.asp?imgname=" & Request.Form("imgname1") & """>" & vbNewLine & _
Anyone see my blunder?

 

Replies ...


HuwR
13 March 2009, 07:50


uhm, I m not sure I understand what you are asking for, what x/y coordinates?
and why do you have an </a> after the image button ?
SiSL
13 March 2009, 08:06


value=strpd(1) ?
instead would not it be :

value=" & strpd(1) & "
Carefree
13 March 2009, 10:25


I've been playing with using hyperlinked photographs of common objects as a different form of CAPTCHA that doesn't require typing. There's a guy in the Ukraine who came up with a really nice system - it uses randomly fetched images from "images.google.com" and blurs a small area of the image at randomly located screen coordinates within the photo's frame. Unfortunately, I don't understand his coding and haven't been able to figure out how to make it work with asp.

Huwr: (/a is because I changed the format and forgot to remove the closing /a). XY screen coordinates are automatically passed when a photo is used as an input. Retrieve them by calling the Request.Form(variable.x or variable.y). I solved my problem by checking for the existence of an X coordinate instead of trying to get the value="" to retain it's data.

SISL: It didn't retain it's value regardless of which method I used, so I canned that and went with a different approach.

Here's a snapshot of what my little program does. I made 20 small photos, each of identical size, so it doesn't become too predictable.
Since I have that working (although not the cleanest code nor the best way to skin a cat, I'm sure), the information has to be protected from any source viewing.
HuwR
13 March 2009, 11:27


ok got you, and no the value is not actually passed when input type=image smile
Shaggy
13 March 2009, 11:40


Note that you can only have one image input per form.
Carefree
13 March 2009, 12:22


Shaggy: The way I created the form, it will only accept a single click (and thus a single "input") before posting. When I check the value of Request.Form("variable")'s X or Y coordinates, all are null except for those of the image which was clicked.
It's not ready for use (information accessible via source code, etc), but if someone wants to look at it, here's the link.
© 2000-2021 Snitz™ Communications