chrometweaks.org

What is the best the best free iPage web hosting to create a site ?

Click Here To View All Answers...


Question I have... What is the best the best free iPage web hosting to create a site ? Many thanks for any answer. Another question on my mind: Hello I was wondering if there is a way to have my form cause a pop up (say 400x200) "thank you" instead of taking up the full page and at the same time opening up the main page (where they came from unless form was put in favorites) and then the pop up closing after either 10 seconds or the other page has loaded what ever one is longest??...also is there a way to make a "cancel" button that would give a conformation (yes or no) to cancel and go back to the main page...i used to have the code for a conformation but lost it when I had to wipe my hard drive.

Below is a copy of one of my forms i'm sure I can easly find what I would need to put in the other to do the same.

<html>.

<head>.

<title> Please email us your ideas or suggestions </title>.

</head>.

<body background="tvbkgnd.gif" bgproperties="fixed">.

<form method="post" action="http://home.earthlink.net/cgi-bin/mailto">.

<input type="hidden" name="RECIPIENT" value=""><input.

Type="hidden" name="SUBJECT" value="Suggestions and/or Comments"><p><b>User Name:</b><input.

Type="text" name="name" size="30"><br>.

<b>Email:</b><input type="text" name="email" size="30"></p>.

<p><b>Your comments or suggestions</b><br>.

<textarea name="my suggestion or comments" rows="10" cols="50"></textarea> </p>.

<p><input type="submit" value="Send"> <input type="reset" value="Clear"> </p>.

</form>.

</body>.

</html>.

Also gonna add to check and make sure there is something in those fields the "email" and "name"...oh and one more thing how do I go about verifying that the email is in the correct format?.

Well that's enough questions lol and thanks all for the help in advance..

Comments (11)

That's a good question. I'm not sure what is the right answer. I'll do some Googling and get back to you if I bump into an decent answer. You should email the people at iPage as they probably could give you help..

Comment #1

Huwey,.

If you wanna make the cancel button load the home page instead, change cancel_it() to:.

<script>.

Function cancel_it() {.

Var okay = confirm('Are you sure you want to cancel?');.

If (okay == true) {.

Window.location.href="homepage.html";.

}.

}.

</script>.

As for e-mail validation, the other thing I can think of is to check that there is an @ symbol in the string. Change the send_it() function to:.

<script>.

Function send_it() {.

If(document.formname.email.value == "") {.

Alert("Fill out the form properly, fool");.

} else if(document.formname.email.value.indexof("@") == -1) {.

Alert("That is not a proper e-mail address, fool");.

}else if(document.formname.yourname.value == "") {.

Alert("Fill out the form properly, fool");.

} else {.

Window.open('confirmpage.html','newWindow','scrollbars=no,tollbars=no,width=400,height=200');.

Document.formname.submit();.

}.

}.

</script>.

Hope that helps.....

Comment #2

And to verify the proper format of the email, you are going to have to use several substr calls. One to make sure there is text before the @ symbol, one to make sure there is text between the @ and the ., and a final one to check for text after theIt would look like this..

Variable name = email.

First = substr(0, '@');.

Second = substr('@', '.');.

Third = substr('.', email.length);.

If(first == "" || second == "" || third == "").

Alert("Please enter email in correct format.");.

This is not exactly how it is done, just so you get the idea. If you want me to post the actual code I can...

Comment #3

Ok here is my code so far for this form.

<html>.

<head>.

<title> Please email us your ideas or suggestions </title>.

<script>.

Function cancel_it() {.

Var okay = confirm('Are you sure you want to cancel?');.

If (okay == true) {.

Window.location.href="../index.html";.

}.

}.

</script>.

<script>.

Function send_it() {.

If(document.comments.yourname.value == "") {.

Alert("Please fill in your name");.

} else if(document.comments.email.value == "") {.

Alert("Please fill in your email");.

} else if(document.comments.email.value.indexof("@") == -1) {.

Alert("Please check your email address to make sure you have it correct, Thanks");.

} else {.

Window.open('../thankyou.html','newWindow','scrollbars=no,tollbars=no,width=500,height=200');.

Document.comments.submit();.

}.

}.

</script>.

</head>.

<body background="tvbkgnd.gif" bgproperties="fixed">.

<form name="comments" method="post" action="http://home.earthlink.net/cgi-bin/mailto">.

<input type="hidden" name="RECIPIENT" value=" to xxxx@xxxxxcom if you get my picture and hoping to start getting more emails coming in.

Thanks again for everyones help..

Comment #4

That code will check to make sure that the @ is in the code, but doesn't make sure that there is text before and after the @ sign...here is code I regularly use to check emails, and it works great for me. Substitute exeightform with the name of your form..

<! This function performs a verification on Email Addresses.

Function VerifyEmail(eadd) {.

If (eadd == null || eadd == "") { //Not empty.

Alert ("Please enter your Email Address");.

Exeightform.email.focus();.

Return false;.

}.

AtPos= eadd.indexOf("@",1).

// Check for the @ Symbol.

If (atPos == -1) {.

Alert ("Please enter a valid Email Address");.

Exeightform.email.focus();.

Return false;.

}.

If (eadd.indexOf("@",atPos+1) != -1) {.

// Check for only one @ Symbol.

Alert ("Please enter a valid Email Address");.

Exeightform.email.focus();.

Return false;.

}.

PeriodPos = eadd.indexOf(".",atPos).

If (periodPos == -1) {.

// Check for at least oneafter the @.

Alert ("Please enter a valid Email Address");.

Exeightform.email.focus();.

Return false;.

}.

If (periodPos+3 > eadd.length) {.

// Check for at least Two Char. after the ".".

Alert ("Please enter a valid Email Address");.

Exeightform.email.focus();.

Return false;.

}.

Return true.

}..

Comment #5

Ok not sure if i'm missing something or what..lol very possible with me...i placed that code into my page changed what you said needed changed but it's coming up to please enter my email no matter if it's blank or not...also using the "send_it()" to check the name...and as long as there is a name it's still processing the form and sending it...i do get the box about the email but still gets sent...even tried changing the eadd to "email" and saved as a different file that didn't help it with always saying to enter my email.....here is what I have of it so far.

"example".

If you try it and it sends you will need to click back from the page that comes up cause that page ISN'T linked by that page yet.

Btw if you want to test it (if you try and make changes) go right ahead just put something like "test" or something in the comments section that way I will know and just delete it..

Comment #6

Two questions:.

1) Are you doing the "proper" email form, like.



??.

2) Have you changed the variable name on the focus calls to the name of your text field on your form. Otherwise, the focus, which is supposed to bring it back to the field, will not execute properly...

Comment #7

Ok the way i'm reading the code you gave me if nothing is placed it should prompt you to enter your email...if something is placed in the email spot but not the proper email format it should prompt you to enter a valid email I used different ways of my email both correct and messed up I would put just "huwey" comes up to enter my email...put "/~zone_disney/"><input.

Type="hidden" name="SUBJECT" value="Suggestions and/or Comments"><p><b>User Name:</b><input.

Type="text" name="yourname" size="17" maxlength="16"><br>.

<b>Email:</b><input type="text" name="email" size="30"></p>.

<p><b>Your comments or suggestions</b><br>.

<textarea name="my_suggestion_or_comments" rows="10" cols="50"></textarea> </p>.

<p><input type="submit" value="Send" OnClick="javascript.

:VerifyEmail();"> <input type="reset".

Value="Start Over"> <input type="button" value="Cancel" onClick="javascript.

:cancel_it();"> </p>.

</form>.

</body>.

</html>.

I have even had the onclick for the send as just VerifyEmail() and done the same thing...do you see what is wrong here?....and notice the focus and the field i'm wanting are both named "email".

It is setup right atleast that part of it is.

Comments(form name).email(field name).focus() so is there something here i'm missing?..

Comment #8

You are calling the verifyEmail function, but you are not sending it a variable. You need to call it like this, verifyEmail(email) and then it can check that variable for all the according things...

Comment #9

Ok I haven't changed anything but the "send" button and it now says this.

<input type="submit" value="Send" OnClick="javascript.

:VerifyEmail(email);">.

And i'm getting an error on line 23 char. 1 and that is this line.

AtPos= eadd.indexOf("@",1).

Oh I take that back I did change "<script>" to "<script language="JavaScript">" and added "<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">" as my first line but I wouldn't think that would affect line 23...if you would like I can attach the file I have for you to look at..

Comment #10

Instead of calling the verify email code from the submit button, try adding this to the form tag and taking the onClick event handler out of the input:.

<form name="comments" method="post".

Action="http://home.earthlink.net/cgi-bin/mailto".

Onsubmit="return verifyEmail(email)".

>.

See how that works.....

Comment #11

Forget that, I have it working now. Here is the code..

<html> <head> <title> Please email us your ideas.

Or suggestions </title>.

</head>.

<body background="tvbkgnd.gif" bgproperties="fixed">.

<script>.

Function cancel_it() {.

Var okay = confirm('Canceling will return you to our home page.');.

If (okay == true) {.

Window.location.href="../index.html"; }.

}.

</script>.

<script>.

Function VerifyForm() {.

If (!VerifyEmail (comments.email.value)) {.

Comments.email.focus();.

Return false; }.

Else;.

}.

<! This function performs a verification on Email Addresses.

Function VerifyEmail(eadd) {.

If (eadd == null || eadd == "") { //Not empty.

Alert ("Please enter your Email Address");.

Comments.email.focus();.

Return false;.

}.

AtPos= eadd.indexOf("@",1)// Check for the @ Symbol.

If (atPos == -1) {.

Alert ("Please enter a valid Email Address");.

Comments.email.focus();.

Return false;.

}.

If (eadd.indexOf("@",atPos+1) != -1) { // Check for only one @ Symbol.

Alert ("Please enter a valid Email Address");.

Comments.email.focus();.

Return false;.

}.

PeriodPos= eadd.indexOf(".",atPos).

If (periodPos == -1) { // Check for at least oneafter the @.

Alert ("Please enter a valid Email Address");.

Comments.email.focus();.

Return false;.

}.

If (periodPos+3 > eadd.length) { // Check for at least Two Char. after the ".".

Alert ("Please enter a valid Email Address");.

Comments.email.focus();.

Return false;.

}.

Return true.

}.

</script>.

<BR><BR>.

<p>.

<BR><BR><form name="comments" method="post".

Action="http://home.earthlink.net/cgi-bin/mailto" onSubmit="return VerifyForm(this)"> <BR>.

<input type="hidden" name="RECIPIENT" value="/~zone_disney/">.

<input type="hidden" name="SUBJECT" value="Suggestions and/or Comments">.

<p><b>User Name:</b>.

<input type="text" name="yourname" size="17" maxlength="16">.

<BR><b>Email:</b>.

<input type="text" name="email" size="30"></p>.

<BR><p><b>Your comments or suggestions</b><br>.

<textarea name="my_suggestion_or_comments" rows="10" cols="50"></textarea>.

</p> <p>.

<input type="submit" value="Send">.

<input type="reset" value="Start Over">.

<input type="button" value="Cancel" onClick="javascript.

:cancel_it();"> </p>.

</form>.

<BR>.

<p> <BR></body> </html>..

Comment #12


This question was taken from a support group/message board and re-posted here so others can learn from it.