G
Geoff Cox
Hello,
I am trying to get each "Situation - etc" in
document.getElementById("Slider1ValueText").innerHTML
+= escape("\n") + "Situation - " + title[situation_number] + ": ";
to start on a new line in the email which contains the data sent using
<form and formmail-nms.cgi.
I've tried escape("\n") as above, plus \n, \n\r, \\n\\r etc etc but
cannot get it to work. Ideas please?!
Cheers
Geoff
function saveIt()
{
document.getElementById("Slider1ValueText").innerHTML = "";
for (situation_number = 0; situation_number < 7; situation_number++)
{
document.getElementById("Slider1ValueText").innerHTML
+= "Situation - " + title[situation_number] + ": ";
for (var i = 0; i < slider_value[situation_number].length; i++)
{
document.getElementById("Slider1ValueText")
..innerHTML += this.slider_value[situation_number] + ' ';
}
}
var htmlArray = [
"<form action='http://website/cgi-bin/formmail-nms.cgi'",
" method='post'>",
"<input type='hidden' name='recipient' value='extraemails'>",
"<input type='hidden' name='realname' value='SPA Form'>",
"<input type='hidden' name='First name' value='" + firstname + "'>",
"<input type='hidden' name='Last name' value='" + lastname + "'>",
"<input type='hidden' name='Slider Values' value='" +
document.getElementById('Slider1ValueText').innerHTML + "'>",
"<input type='submit' value='send'></form>"
];
document.getElementById("formdata").innerHTML = htmlArray.join(' ');
var subForm = document.getElementById("formdata");
subForm = document.getElementsByTagName('FORM')[0];
subForm.submit();
}
I am trying to get each "Situation - etc" in
document.getElementById("Slider1ValueText").innerHTML
+= escape("\n") + "Situation - " + title[situation_number] + ": ";
to start on a new line in the email which contains the data sent using
<form and formmail-nms.cgi.
I've tried escape("\n") as above, plus \n, \n\r, \\n\\r etc etc but
cannot get it to work. Ideas please?!
Cheers
Geoff
function saveIt()
{
document.getElementById("Slider1ValueText").innerHTML = "";
for (situation_number = 0; situation_number < 7; situation_number++)
{
document.getElementById("Slider1ValueText").innerHTML
+= "Situation - " + title[situation_number] + ": ";
for (var i = 0; i < slider_value[situation_number].length; i++)
{
document.getElementById("Slider1ValueText")
..innerHTML += this.slider_value[situation_number] + ' ';
}
}
var htmlArray = [
"<form action='http://website/cgi-bin/formmail-nms.cgi'",
" method='post'>",
"<input type='hidden' name='recipient' value='extraemails'>",
"<input type='hidden' name='realname' value='SPA Form'>",
"<input type='hidden' name='First name' value='" + firstname + "'>",
"<input type='hidden' name='Last name' value='" + lastname + "'>",
"<input type='hidden' name='Slider Values' value='" +
document.getElementById('Slider1ValueText').innerHTML + "'>",
"<input type='submit' value='send'></form>"
];
document.getElementById("formdata").innerHTML = htmlArray.join(' ');
var subForm = document.getElementById("formdata");
subForm = document.getElementsByTagName('FORM')[0];
subForm.submit();
}