1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152
| <html>
<head>
<title></title>
</head>
<body>
<script type="text/javascript">
// Remplace les caractères accentués (+ espace)
function htmlToAccent(str) {
var norm = new Array("é", "É", "è", "È", "ê", "Ê", "ë", "Ë", "à", "À", "ù", "Ù", "ç", "Ç");
var spec = new Array("e", "E", "e", "E", "e", "E", "e", "E", "a", "A", "u", "U", "c", "C");
for (var i = 0; i < spec.length; i++) {
while(str.indexOf(norm[i]) != -1) {
str = str.replace(norm[i], spec[i]);
}
}
return str;
}
function envoyeremail() {
var url = "mailto:monemail@email.fr?subject=Demande&body=";
var body = 'Nom : '+document.getElementById('sender_name').value+'%0A';
body += htmlToAccent('Prénom : ')+htmlToAccent(document.getElementById('sender_surname').value)+'%0A';
body += htmlToAccent('Adresse : ')+htmlToAccent(document.getElementById('adresse1').value)+'%0A';
body += ' '+htmlToAccent(document.getElementById('adresse2').value)+'%0A';
body += htmlToAccent('Téléphone : ')+htmlToAccent(document.getElementById('telephone').value)+'%0A';
body += htmlToAccent('Email : ')+htmlToAccent(document.getElementById('email').value)+'%0A';
body += htmlToAccent('Préférence pour joindre : ')+htmlToAccent(document.getElementById('preferenceJoindre').value)+'%0A';
var demande = document.getElementById('message').value;
demande = demande.replace(/\n/g, '%0A');
demande = htmlToAccent(demande);
body += 'Demande : '+demande;
url += body;
location.href = url;
}
</script>
<form id="formulaire">
<table width="550px" border="0" align="center">
<tbody><tr>
<td colspan="2" align="center" valign="top">
<fieldset>
<legend> Votre demande </legend>
<table>
<tbody><tr>
<td width="15px"> </td>
<td align="right" width="250px">Votre demande concerne :</td>
<td align="left">
<textarea name="message" id="message" cols="35" rows="8" class="email_news" onfocus="this.style.backgroundColor='#FBE6ED';" onblur="this.style.backgroundColor='';"></textarea>
</td>
<td width="15px"> </td>
</tr>
</tbody>
</table>
</fieldset>
<br>
<fieldset>
<legend> Vos coordonnées </legend>
<table>
<tbody><tr>
<td width="15px"> </td>
<td align="right" width="250px">Nom :</td>
<td width="150px" align="left">
<input type="text" id="sender_name" size="30" onfocus="this.style.backgroundColor='#FBE6ED';" onblur="this.style.backgroundColor='';">
</td>
<td width="15px"> </td>
</tr>
<tr>
<td> </td>
<td align="right" width="250px">Prénom : </td>
<td align="left">
<input type="text" id="sender_surname" size="30" onfocus="this.style.backgroundColor='#FBE6ED';" onblur="this.style.backgroundColor='';">
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="right" width="250px">Adresse 1 :</td>
<td align="left">
<input id="adresse1" type="text" id="adresse1" size="30" onfocus="this.style.backgroundColor='#FBE6ED';" onblur="this.style.backgroundColor='';">
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="right" width="250px">Adresse :</td>
<td align="left">
<input id="adresse2" type="text" id="adresse2" size="30" onfocus="this.style.backgroundColor='#FBE6ED';" onblur="this.style.backgroundColor='';">
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="right" width="250px">Téléphone :</td>
<td align="left">
<input id="telephone" type="text" id="telephone" size="30" onfocus="this.style.backgroundColor='#FBE6ED';" onblur="this.style.backgroundColor='';">
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="right" width="250px"> Email :</td>
<td align="left">
<input id="email" type="text" id="email" size="30" onfocus="this.style.backgroundColor='#FBE6ED';" onblur="this.style.backgroundColor='';">
</td>
<td> </td>
</tr>
<tr>
<td> </td>
<td align="right" width="250px"> Votre préférence pour vous joindre :</td>
<td align="left">
<select id="preferenceJoindre">
<option id="courrier">Par courrier</option>
<option id="email">Par email</option>
<option id="telephone">Par téléphone</option>
</select>
</td>
<td> </td>
</tr>
<tr>
<td colspan="4"> </td>
</tr>
</tbody></table>
</fieldset>
<div align="left"><i>Tous les champs sont à remplir obligatoirement.</i></div>
<br>
</td>
</tr>
<tr>
<td align="left">
<input type="submit" value="Annuler" name="submit" onclick="document.formulaire.reset();">
</td>
<td align="right">
<input type="submit" value="Envoyer" name="submit" onclick="envoyeremail();">
</td>
</tr>
</tbody></table>
</form>
</body>
</html> |
Partager