Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Retrieving image click in servlet  RSS feed

 
trinity jecob
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am having a login jsp page, in whci instead of a button i have an image. I wanted to retrieve whether user has clicked on that image, so that i can allow the user to login.

One way I found is



But i could not understand how it actually works.

Can anyone please explain this?

Thanks in advance
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One way could be using a hidden field and set its value on image click using javascript.
 
Rashid Mayes
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The browser determines the (x,y) and will send the image.x and image.y as parameters. This is helpful with imagemaps.

Can you explain why the form submission is not enough to determine that the user intends to log-in? Would the user click the image to submit the form for any other purpose?

Thanks.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!