Image Submit Button - نوشته شده در (1627 Views)
Advanced Member
Carefree
مطلب: 4224
4224
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?
 پیش‌فرض مرتب‌سازی برای تاریخ DESC به معنی جدیدترین است  
 تعداد در صفحه 
نوشته شده در
Forum Admin
HuwR
مطلب: 20611
20611
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 ?
نوشته شده در
نوشته شده در
Advanced Member
Carefree
مطلب: 4224
4224
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.
نوشته شده در
Forum Admin
HuwR
مطلب: 20611
20611
ok got you, and no the value is not actually passed when input type=image smile
نوشته شده در
Support Moderator
Shaggy
مطلب: 6780
6780
Note that you can only have one image input per form.
Search is your friend “I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
نوشته شده در
Advanced Member
Carefree
مطلب: 4224
4224
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.
 
شما باید یک متن وارد کنید