print $q->start_form(-name=>'form1', -onSubmit=>"return validateForm()") print $q->hidden(-name=>'passit', -value=>'xxx'); print $q->img({-src=>'../../Graphics/somepic1.gif', -onClick=>'form1.passit.value="aaa";'}); print $q->img({-src=>'../../Graphics/somepic2.gif', -onClick=>'form1.passit.value="bbb";'}); ....
Not very exciting but here's an example ... Hope this helps jwm -----Original Message----- From: aman cgiperl [mailto:amancgiperl@;hotmail.com] Sent: November 06, 2002 19:48 To: Sales Department Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [CGI] fetch data from having multiple <input type=image> [NOTICE: see the message footer for important information] Sorry that I did not mention that aaa and bbb are just examples. I won't actually know the expected names, as they are generated at run-time by a cgi script. Thanks Aman ----- Original Message ----- From: "Sales Department" <[EMAIL PROTECTED]> To: "aman cgiperl" <[EMAIL PROTECTED]> Sent: Wednesday, November 06, 2002 6:35 PM Subject: Re: [CGI] fetch data from having multiple <input type=image> > > <form action="fetch.cgi" method=post> > > <input type=hidden name=xyz value=abc> > > <input type=image src="/file/path/aaaa.jpg name=aaa> > > <input type=image src="/file/path/bbbb.jpg name=bbb> > > </form> > > > > When I click on one of the images, the hidden value of xyz get carried > over > > to the fetch.cgi as > > param(xyz) > > > > How can I determine whether img name aaa or bbb was clicked? > > > if($form{aaa}){&do_this;} > if($form{bbb}){&do_that;} > > orrr > > $myPic = $form{name}; > > Andre > ----- Original Message ----- > From: "aman cgiperl" <[EMAIL PROTECTED]> > To: <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Wednesday, November 06, 2002 6:42 PM > Subject: [CGI] fetch data from having multiple <input type=image> > > > > [NOTICE: see the message footer for important information] > > I have a form that looks like this > > > > <form action="fetch.cgi" method=post> > > <input type=hidden name=xyz value=abc> > > <input type=image src="/file/path/aaaa.jpg name=aaa> > > <input type=image src="/file/path/bbbb.jpg name=bbb> > > </form> > > > > When I click on one of the images, the hidden value of xyz get carried > over > > to the fetch.cgi as > > param(xyz) > > > > How can I determine whether img name aaa or bbb was clicked? > > > > Thanks alot > > > > Aman > > -- > > To unusbcribe, send an email contining the words: 'unsubscribe cgi-list' > to the following email address: [EMAIL PROTECTED] > > > > Archives of the following mailing lists are available at: > http://www.perl.jann.com/ > > the CGI Mailing List > > the mod_perl mailing list > > the embperl mailing list > > Searching, browsing and posting are available at http://www.perl.jann.com/ > > > -- To unusbcribe, send an email contining the words: 'unsubscribe cgi-list' to the following email address: [EMAIL PROTECTED] Archives of the following mailing lists are available at: http://www.perl.jann.com/ the CGI Mailing List the mod_perl mailing list the embperl mailing list Searching, browsing and posting are available at http://www.perl.jann.com/ -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]