Welcome visitor
* Login
* Register
It is currently May 22nd, 2019, 2:45 am
All times are UTC [ DST ]
* Search
View unanswered posts - View active topics

FORUMS » Client Side » HTML



Post new topic Reply to topic  [ 2 posts ] 
Author Message
  Apply a unique ID to form-mails sent by mailto
PostPosted: November 26th, 2009, 5:39 pm 

Posts: 22
Hi, I'm receiving many forms that are submitted to my email account via mailto tag. I would like to add an unique ID to each mail that is sent so they can be easily stored, do you know how a trick for this?


Top
 Profile  
 
  Re: Apply a unique ID to form-mails sent by mailto
PostPosted: November 26th, 2009, 6:39 pm 
User avatar

Posts: 112
As you posted here I asume that you are not using a server side language... In that case I can think of a way but the ID will not be completely unique always. This script adds the date to the subject of the mail, it uses miliseconds so it isnt very likely to have the same ID twice, though its possible :P.
<form name="form" action="mailto: " method="post" onsubmit="sendformDate();">
<input type="hidden" name="ID_No." id="hid"/>
<input type="submit" />
</form>
<script type="text/javascript">
  function sendformDate(){
  var codeID=new Date();
  document.getElementById('hid').value=codeID.getTime();
  }
</script>


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

FORUMS » Client Side » HTML


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron