HighDots Forums  

get response on same page?

HTML Writing HTML for the Web (comp.infosystems.www.authoring.html)


Discuss get response on same page? in the HTML forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Geoff Cox
 
Posts: n/a

Default get response on same page? - 10-05-2005 , 10:31 AM






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][i] + ' ';
}
}

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

}

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.