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

Mailto not working properly in jsp  RSS feed

 
vijay makam
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the below code in jsp
<a href="<%=buffer%>"><input type="button" value="send mail"></a>

where, buffer is the constructed mailto string with subject and body

I have two problems with this:
When I click on send mail, two windows of my mail client is getting open.

If I use Internet Explorer as my browser then the mail client is not getting open at all, but if I replace the button with plain text, it works.
 
aswin kumar
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

<a href="<%=buffer%>"><input type="button" value="send mail"></a>
reason for using this,


regards
 
vijay makam
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ashwin,

I can use image or text in place of the button. My question is why can't I use button over there?
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A button works in the context of an HTML form, not an HTML link. That's no loss, since you can use an image and make it look like a button, if you so desire.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!