G
Geoff Cox
Hello,
I am trying to get the code below to use formmail-nms.cgi to send the
thanks.htm response to the same page using target="_self" but this
isn't working - any idea why?
Thanks
Geoff
function saveIt()
{
mySlider1.setValue( (mySlider1.leftValue + mySlider1.rightValue) / 2
);
var sValue="";
for (situation_number = 0; situation_number < 7; situation_number++)
{
sValue+="\n" + "Situation - " + title[situation_number] + ": ";
for (var i = 0; i < slider_value[situation_number].length; i++)
{
sValue+=this.slider_value[situation_number] + ' ';
}
}
var htmlArray = [
"<form action='http://website/cgi-bin/formmail-nms.cgi'",
" method='post' target='_self'>",
"<input type='hidden' name='redirect'
value='http://website/thanks.htm'>",
"<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='" + sValue + "'>",
"<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 the code below to use formmail-nms.cgi to send the
thanks.htm response to the same page using target="_self" but this
isn't working - any idea why?
Thanks
Geoff
function saveIt()
{
mySlider1.setValue( (mySlider1.leftValue + mySlider1.rightValue) / 2
);
var sValue="";
for (situation_number = 0; situation_number < 7; situation_number++)
{
sValue+="\n" + "Situation - " + title[situation_number] + ": ";
for (var i = 0; i < slider_value[situation_number].length; i++)
{
sValue+=this.slider_value[situation_number] + ' ';
}
}
var htmlArray = [
"<form action='http://website/cgi-bin/formmail-nms.cgi'",
" method='post' target='_self'>",
"<input type='hidden' name='redirect'
value='http://website/thanks.htm'>",
"<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='" + sValue + "'>",
"<input type='submit' value='send'></form>"
];
document.getElementById("formdata").innerHTML = htmlArray.join(' ');
var subForm = document.getElementById("formdata");
subForm = document.getElementsByTagName('FORM')[0];
subForm.submit();
}