Date: 11/06/00
- Next message: Claude Cormier: "[PHP] Cookie expiry period"
- Previous message: Leopoldo: "Re: [PHP] Can I get the text from a string that is between two strings?"
- In reply to: Russ Abbott: "[PHP] <input type = image ... >"
- Next in thread: Russ Abbott: "RE: [PHP] <input type = image ... >"
- Reply: Russ Abbott: "RE: [PHP] <input type = image ... >"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
You should be able to do something like this:
In your INPUT tag:
<INPUT TYPE="image" ... ... ... ... NAME="myimage1"> (do not include the
VALUE attribute)
then in the page that your form submits to:
if (isset($myimage1_x)) {
do something useful or possibly not quite so useful;
}
Since your input type is an image, the _x addition to what you named your
input image is implied. From what I understand the $myimage1_x variable
will be set to the x coordinate where the user clicked on the image.
Someone can chime in and correct me if that is wrong though....in either
case, you merely need to check if that variable is set....you shouldn't need
its value.
HTH
Sam Masiello
System Analyst
Chek.Com
(716) 853-1362 x289
smasiello <email protected>
-----Original Message-----
From: Russ Abbott [mailto:RAbbott <email protected>]
Sent: Monday, November 06, 2000 10:30 AM
To: php-general <email protected>
Subject: [PHP] <input type = image ... >
I'd like to use a tag such as <input type=image name=n value=v>
to pass v as a value of $n, but it doesn't seem to work.
I have this tag inside a form, and clicking on the image does trigger
the program pointed to by the form, but $n is not bound to anything.
(Other <input ... > tags have their values posted properly.)
If I change type=image to type=submit, a button is generated and $n
is bound to v as expected. Is there some way to substitute an image
for a button and associate data with the image?
I want to have a group of images, each with a different data value,
and then have the program be told which image was clicked.
Thanks.
-- Russ Abbott
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe <email protected> For additional commands, e-mail: php-general-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Claude Cormier: "[PHP] Cookie expiry period"
- Previous message: Leopoldo: "Re: [PHP] Can I get the text from a string that is between two strings?"
- In reply to: Russ Abbott: "[PHP] <input type = image ... >"
- Next in thread: Russ Abbott: "RE: [PHP] <input type = image ... >"
- Reply: Russ Abbott: "RE: [PHP] <input type = image ... >"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

