Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 05-06-2004, 05:01 AM   PM User | #1
mbay
Regular Coder

 
Join Date: May 2004
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
mbay is an unknown quantity at this point
Html Form in a pop up window javascript

I have created a form in a pop up window. Once the form is submitted, I would like the form to send the information to my email address at michel.bayard@videotron.ca and then go to a customized thank you page within the same pop up (thankyou.html). In the form action, I have it as my e-mail address, which works fine, but I cannot have the thank you page appear afterwards. If i change the action to the thank you page and change the method to get then the page will appear, but then it doesn't send the e-mail to my address. I am really not a coding person at all and don't know too much. Is there a script I can integrate that upon submission of form that it verifies the required fields and if all is correct sends it to my email address and then goes to the thank you page?

Any contribution would be greatly appreciated.

Thank you kindly in advance.

--

This part in in the "head" aspect of the html

<SCRIPT LANGUAGE="JavaScript">

image1 = new Image();
image1.src = "../img/closewindow_over.gif";

function checkrequired(which) {
var pass=true;
if (document.images) {
for (i=0;i<which.length;i++) {
var tempobj=which.elements[i];
if (tempobj.name.substring(0,8)=="required") {
if (((tempobj.type=="text"||tempobj.type=="textarea")&&
tempobj.value=='')||(tempobj.type.toString().charAt(0)=="s"&&
tempobj.selectedIndex==0)) {
pass=false;
break;
}
}
}
}

if (!pass) {
shortFieldName=tempobj.name.substring(8,30).toUpperCase();
window.open('../html/form_email_missing.html', 'newwin','width=256,height=110, toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, directories=no, status=no, left=0,top=100,screenX=0,screenY=100');
return false;
}
else
return true;
}

</script>

In the form aspect I have this code:

form action="mailto:michel.bayard@videotron.ca" method="post" enctype="text/plain"
mbay is offline   Reply With Quote
Old 05-06-2004, 06:51 AM   PM User | #2
JPM
Regular Coder

 
Join Date: Mar 2004
Location: Norway
Posts: 204
Thanks: 0
Thanked 0 Times in 0 Posts
JPM is an unknown quantity at this point
the 'thankYou.html' could be opened with 'document.location = thankyou.html'
__________________
<JPM />
JPM is offline   Reply With Quote
Old 05-06-2004, 04:41 PM   PM User | #3
mbay
Regular Coder

 
Join Date: May 2004
Posts: 119
Thanks: 0
Thanked 0 Times in 0 Posts
mbay is an unknown quantity at this point
Thank you for your reply!!!!

But where do I put this code? Is it in the script header, or onsubmit? I don't know where to put it!!!!

Thanks for your help!
mbay is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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

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

Forum Jump


All times are GMT +1. The time now is 12:26 AM.


Advertisement
Log in to turn off these ads.