Click to See Complete Forum and Search --> : I am not a pro and I need help with form results


alley2006
01-04-2006, 01:00 PM
I am a beginner and I've been going crazy trying to find 2 things for my forms:
1 - I want my forms to do the same thing that this forum does when you register or login...I want a "thank you" or "welcome" page where the data I put in the form are used to greet and verify the input. "Welcome Alley2006 we just sent you an e-mail at you@ you.com", etc.I could do that easily with front page but now I'm using dreamweaver and it is more complex to figure out.
2 - I would also like to have a something like on this website www.namesdatabase.com. There is a form and not only it has pop-ups with error messages but at the end there is a pop-up that asks you to confirm the data you input (it lists the data) and then click OK or Cancel. I looked for a javascript with this function everywhere.
I copied and pasted the code and tried to modify it to fit my forms but it didn't work.
HELP!! Thank you...

A1ien51
01-04-2006, 02:11 PM
And what server side language are you using?

Eric

alley2006
01-04-2006, 02:42 PM
Good question...I have a linux pachage at 1and1.com
It supports pretty much everything...

FromU2ME
01-04-2006, 02:47 PM
The "pop-ups" you are talking about aren't really pop-ups, they're so-called alert boxes, to trigger one is by:

alert("Text in here");
Your first point cannot be done with JavaScript, though... :(

alley2006
01-04-2006, 03:10 PM
Yeah...the alert boxes :)
the code you gave me goes in the head or body?
and how do I have the alert box display the form input data?

If the 1st point cannot be done with JavaScript, then how :( ?

Thank you for your help

FromU2ME
01-04-2006, 03:16 PM
You'll need to send the code so that I would know where to put the alert code...

And what server side language are you using?Use a server-side script for the second task (PHP, ASP, JSP, CGI...).

alley2006
01-04-2006, 03:24 PM
send you what code? my form?

I've been looking for a server-side script for that function
but I can't find it...

FromU2ME
01-04-2006, 03:34 PM
Your form would be nice, yes :D

alley2006
01-04-2006, 03:39 PM
Sorry I'm just a beginner...you need to be patient with me :p
Right now there's a alert box that only says that the data has been submitted successfully...but I need the details in it..

<form method="post" action="http://www.computerhelpfiles.com/cgi-bin/FormMail.pl" name="form2" target="_blank">
<p><span class="style27"><span class="style11">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;E-mail</span>
<input name="e-mail" type="text" id="e-mail" maxlength="50">
</span>
<input type="hidden" name="redirect" value="http://www.computerhelpfiles.com/thankyou.htm">
<span class="style27">
<input type="hidden" name="recipient" value="newsletter@computerhelpfiles.com">
</span> <input type="hidden" name="subject" value="Newsletter subscription">
<input name="Submit" type="submit" onClick="MM_callJS('processMyForm()')" value="Submit">
</p>
<p align="left"><span class="style35">You will be subscriber # <!-- Start of StatCounter Code -->
<script type="text/javascript" language="javascript">
var sc_project=1154991;
var sc_invisible=0;
var sc_partition=10;
var sc_security="4b8d58bf";
var sc_text=2;
var sc_remove_link=1;
</script>

<script type="text/javascript" language="javascript" src="http://www.statcounter.com/counter/counter.js"></script><noscript><img src="http://c11.statcounter.com/counter.php?sc_project=1154991&amp;java=0&amp;security=4b8d58bf&amp;invisible=0" alt="free counter with statistics" border="0"> </noscript>
<!-- End of StatCounter Code -->as of December 28, 2005</span><br>
<span class="style22" style="font-size: 12px"><span class="style3" style="font-size: 12px"><font style="font-size: 9pt"><span class="style8"><span class="style26"> </span></span></font></span></span>
</p>
</form>

FromU2ME
01-04-2006, 03:44 PM
You should put it in the <form>-tag onsubmit="alert('Text');".

I also noticed that your submit button contains another script:

<input name="Submit" type="submit" onClick="MM_callJS('processMyForm()')" value="Submit">What does this do (have the code for that as well)?

--EDIT
I'll be back tomorrow.

alley2006
01-04-2006, 03:51 PM
yes that script calls a alert box that says "the data has been submitted...etc."

<script language="JavaScript" type="text/JavaScript">
function processMyForm(){
alert('Thank you! You data has been sent successfully.');
}
<!--
function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}
//-->
</script>

napoleonv
01-04-2006, 05:00 PM
Try changing the type to "button" instead of "submit".

Napoleon N. Valdez
Senior Web Database Developer
Caspio, Inc.
Toll-free: (877) 820-9100 ext. 703
Local or International: +1.408.970.0500 ext. 703
Fax: 1.408.516.9925
Email: nvaldez@caspio.com
http://www.caspio.com

alley2006
01-04-2006, 05:15 PM
the problem is not this script...that works...what I am trying to find out if I can do these 2 things:
1 - I want my forms to do the same thing that this forum does when you register or login...I want a "thank you" or "welcome" page where the data I put in the form are used to greet and verify the input. "Welcome Alley2006 we just sent you an e-mail at you@ you.com", etc.I could do that easily with front page but now I'm using dreamweaver and it is more complex to figure out.
2 - I would also like to have a something like on this website www.namesdatabase.com. There is a form and not only it has alert boxes with error messages but at the end there is an alert box that asks you to confirm the data you input (it lists the data) and then click OK or Cancel. I looked for a javascript with this function everywhere.
I copied and pasted the code and tried to modify it to fit my forms but it didn't work.