<script language="javascript">
function ImgClick(imgName)
{ ThisImage = document.all[imgName];
document.form1.fred.value = ThisImage.value;
}
</script>
<form name="form1">
<input type=hidden value="" name="fred">
<input type="image" src="image.bmp" onlcick="ImgClick('image1')" name=image1
value="i1">
<input type="image" src="image2.bmp" onlcick="ImgClick('image2')"
name=image2 value="i2">
</form>
I'm pretty sure the event will fire before the submission but you'll need to
experiment a bit (and treat this as pseudo code)
Tim Ward
Senior Systems Engineer
Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html
> -----Original Message-----
> From: Paulson, Joseph V. "Jay" [mailto:[EMAIL PROTECTED]]
> Sent: 29 March 2001 16:17
> To: 'Tim Ward'; 'Fabian Raygosa'; [EMAIL PROTECTED]
> Subject: RE: [PHP] Easy HTML PHP question
>
>
> Yeah that would work if I knew how to do that? Any
> suggestions on how to go
> about doing that?
>
> Thanks,
> Jay
>
> -----Original Message-----
> From: Tim Ward [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, March 29, 2001 1:59 AM
> To: 'Fabian Raygosa'; Paulson, Joseph V. "Jay";
> [EMAIL PROTECTED]
> Subject: RE: [PHP] Easy HTML PHP question
>
>
> he's right, but what about using the onclick event of the
> image to store a
> value in a hidden field (I haven't tried this but there's no
> reason to think
> it won't work)
>
> Tim Ward
> Senior Systems Engineer
>
> Please refer to the following disclaimer in respect of this message:
> http://www.stivesdirect.com/e-mail-disclaimer.html
>
>
> > -----Original Message-----
> > From: Fabian Raygosa [mailto:[EMAIL PROTECTED]]
> > Sent: 29 March 2001 01:11
> > To: Paulson, Joseph V. "Jay"; [EMAIL PROTECTED]
> > Subject: Re: [PHP] Easy HTML PHP question
> >
> >
> > For images i think its different, i don't think you can force
> > the image name
> > that value
> > instead the value gets turned into "button_x" and "button_y"
> > with relation
> > to where the mouse clicked on the image. In any event try
> > using GET method
> > instead of POST method to see whats displayed on the url
> > string then you
> > will have your answer
> >
> > ----- Original Message -----
> > From: "Paulson, Joseph V. "Jay"" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Wednesday, March 28, 2001 3:51 PM
> > Subject: [PHP] Easy HTML PHP question
> >
> >
> > > Hello everyone-
> > > I have a pretty easy question that I can't seem to answer
> > myself so I'm
> > > coming to you all. Below you'll see some html code for a
> > form. Now what
> > > happens is that when I click on one of the images to
> submit the form
> > (either
> > > on the update_event.gif image or the delete_event.gif
> > image) the form goes
> > > to redirect.php. The problem I am having is that I have a switch
> > statement
> > > which runs off the variable "button" on the redirect.php
> > page (hence the
> > > name="button" in the form). However, you would think if
> > you clicked on
> > the
> > > update_event.gif that "button" would be set to
> "updateEvent" on the
> > > redirect.php page. Well it isn't set to anything at all!
> > Here's the
> > other
> > > problem, since I have two different acctions I can do on
> > the same page I
> > > can't do Hidden variables on this page because I can't have
> > button being
> > two
> > > different values.
> > >
> > > Anyway, what I need is when a user clicks on the image to
> > submit the form
> > I
> > > need the button to be set to the correct value. Any
> > suggestions on how to
> > > do this??
> > >
> > > <form action="redirect.php" method="post">
> > >
> > > <input type="image" border="0" name="button"
> > src="images/update_event.gif"
> > > value="updateEvent">
> > >
> > > <input type="image" border="0" name="button"
> > src="images/delete_event.gif"
> > > value="deleteEvent">
> > >
> > > </form>
> > >
> > > Thanks!
> > > Jay Paulson
> > > Developer, Web Technologies
> > > Viatel, Inc.
> > > http://www.viatel.com
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
> > [EMAIL PROTECTED]
> >
> >
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]