Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Submit a form and have "thank you" message pop up


  • Please log in to reply

#1
promoter

promoter

    Member

  • Member
  • PipPip
  • 31 posts
Hi. I have a form in which the customer fills out their contact information to be on an emailing list. Once they submit their info, I need a smaller window to pop up saying "we've received your information blah blah blah". Currently this submission page takes the customer to a Thank you page within the same browser window, that is target="_self". Here is the code I am using that works correctly:

<body>
<form action="thankyou.asp" method="post" onSubmit="return CheckInputFields()" name="form1">
<img src="images/submit.gif" alt="Submit Information" name="submitinfo" onClick="return CheckInputFields()">

This is what I tried to do to make the Thankyou page open in a smaller window:

<head>
function open_win()
{
window.open("http://www.dundeecandy.com/thankyou.asp","_blank","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=400, height=400")
}
</head>
<body>
<img src="images/submit.gif" alt="Submit Information" name="submitinfo" onClick="return CheckInputFields(), open_win()">

I think the problem is where I put "open_win()". I don't know where to put that so I decided the put a comma after CheckInputFields() thinking that the onClick could do both things.

Does anyone know of a code that could take care of both processes: submitting information to a company and displaying a small window browser confirming the info was received? Thanks!

Edited by promoter, 13 September 2006 - 08:53 AM.

  • 0

Advertisements


#2
Dustinduse

Dustinduse

    Member

  • Member
  • PipPip
  • 99 posts
I would use a Java Script alert like this
<INPUT TYPE="button" Value="Submit"
		   onClick="alert('We have got your stuff blah blah')")>
		   
</FORM>
And somehow diret them to your thank you page... (sorry not much time this morning)
But thats what im thinking would work. I hope it helps!
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP