EasyUI Forum
May 17, 2024, 04:31:00 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Normal HREF link on form with mailto: but with value from datafield email  (Read 13261 times)
Spike
Newbie
*
Posts: 22


View Profile
« on: November 26, 2014, 08:01:42 AM »

Hello,

I have a form and want a <a href="mailto:client@client.nl">click to open mailprog</a>  on my form so that a user can click on it, and his mail-program starts.

The mailto must have the same value of the easyui textbox with data field email.
I tried it with a link button but it is not working.

Is there anybody who has an tip/idea?

<form id="ff" action="update.php" method="post" >
<table>
<tr>
   <td>E-mail</td>
  <td colspan="4"><input  name="email" size="80" class="easyui-validatebox textbox" data-options="required:false,validType:'email'"></td>
  <td colspan="3"><a href="#" class="easyui-linkbutton" iconCls="icon-print" plain="true" onclick="mail_klant()">Mail Client</a></td>
</tr>   

Thanks in advance

Spike
Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: November 27, 2014, 12:33:48 AM »

Please try this:
Code:
<input name="email" size="80" class="easyui-textbox" data-options="
required:false,
validType:'email',
onChange:function(value){
$('#btn1').attr('href','mailto:'+value)
}">
<a id="btn1" href="#" class="easyui-linkbutton" iconCls="icon-print" plain="true">Mail Client</a>
Logged
Spike
Newbie
*
Posts: 22


View Profile
« Reply #2 on: November 27, 2014, 02:30:02 AM »

Thanks stworthy;

Your example code is sadly not working  Sad

I only want a URL on my form with a href="mailto:email@value.com"  with the email value from input value email.

Or is it possible by placing a panel in combination with getcontent?

Thanks for you support   Smiley
« Last Edit: November 27, 2014, 02:36:46 AM by Spike » Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: November 27, 2014, 03:58:52 AM »

I only want a URL on my form with a href="mailto:email@value.com"  with the email value from input value email.

Please explain your requirement in more detail.
Logged
Spike
Newbie
*
Posts: 22


View Profile
« Reply #4 on: November 27, 2014, 04:27:43 AM »


I try to explain It by an image (see attachment).

In my EasyUI form there is an inputbox with an email value.

I need a link button "email client" on my form which opens my Thunderbird or Outlook with same email adress.
Hope you understand better what I want.

Thanks for your help!


Logged
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #5 on: November 27, 2014, 06:27:23 AM »

Please try this example http://jsfiddle.net/jc24hvLL/2/. You must upgrade EasyUI to version 1.4 or higher.
Logged
Spike
Newbie
*
Posts: 22


View Profile
« Reply #6 on: November 27, 2014, 07:08:04 AM »

Exactly what I want!

Thanks  stworthy Smiley

Don't know my EasyUI version for now.
Will check it later.

Hope new EasyUi version is downwards compatible  Smiley

Regards Spike
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!