Mailto on a web form

They have: 1 posts

Joined: Apr 2008

Hi I have created an HTML page to be used on my computer to automate a monotonous task of sending text messages. I have my email set up so if I enter a telephone number I can send an SMS message to a phone using 07776876543@sms in the TO field.

I have 15 sites where I visit and for each site there are about 12 people. The people always vary by site [so do their mobile numbers]. I have 15 files, one for each site with the mobile numbers of all the people related to each site.

Heres an example of what the txt file contains [its filename is site 1.txt - to match the radio button control value] the text file is in the same directory as the htm file.

Example contents of the txt file would be -

07771123456@sms, 07771123457@sms, 07771123458@sms.... and more.

Depending on the option selected [radio button] under the heading site im trying to reference the corresponding text file to copy the contents into a string to enter into a mailto command.

The next part of the form is made up of two more radio buttons. There are two possible subjects I would like to be able to send out - they vary depending upon what was found when on the site and some have one or more text boxes I would like to insert into the mailto output string. The string will also prefix the string with the Value [as text] of the site name followed by a space then a hyphen - This can come from the site radio button value.

Depending upon selections the form will take the corresponding text and add it to the string. Whatever the options chosen when the form is filled in and the send message button is clicked it will gather the information as strings and insert them into a mailto command.

I have attached the html file of my form with the message to make it more clear.

As an example if the first site on the list was chosen and the first option on the notification list was chosen and in the first text box in the notification was written the number 1 and in the second text box in the notification line had the date of 01/01/2009 the mailto would look like this -

a href="mailto:07771123456@sms, 07771123457@sms, 07771123458@sms?subject=Site 1 - Bird Number 1 has been seen on the site on 01/01/2009"

I know this is quite a big request but can someone start me off. I have a bit of programming knowledge but not enough to work it out on my own.

I appreciate your assistance.

Thanks

Rob

PS - Please forgive me but I have altered the file extension of the htm file to txt to get the attachment to allow. If you alter it back to htm it will work. [I have also removed the images to make it just the one file]

AttachmentSize
Example mailto form.txt8.51 KB