how get response on same page?

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();

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top