EasyUI Forum

General Category => General Discussion => Topic started by: Spike on November 26, 2014, 08:01:42 AM



Title: Normal HREF link on form with mailto: but with value from datafield email
Post by: Spike 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


Title: Re: Normal HREF link on form with mailto: but with value from datafield email
Post by: stworthy 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>


Title: Re: Normal HREF link on form with mailto: but with value from datafield email
Post by: Spike on November 27, 2014, 02:30:02 AM
Thanks stworthy;

Your example code is sadly not working  :(

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   :)


Title: Re: Normal HREF link on form with mailto: but with value from datafield email
Post by: stworthy 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.


Title: Re: Normal HREF link on form with mailto: but with value from datafield email
Post by: Spike 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!




Title: Re: Normal HREF link on form with mailto: but with value from datafield email
Post by: stworthy 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.


Title: Re: Normal HREF link on form with mailto: but with value from datafield email
Post by: Spike on November 27, 2014, 07:08:04 AM
Exactly what I want!

Thanks  stworthy :)

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

Hope new EasyUi version is downwards compatible  :)

Regards Spike