473,320 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Sendmail Script not working

Mr aldo
15
Hello I have this Sendmail Script here that uses Javascript, so when a field is left empty it makes a pop up saying a field was left empty and you click OK but when you click OK it proccesses it and sends the email and I of course do want that done. Here is the code:
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script>
  4. function doSubmit()
  5. {
  6.     if (validateOne() == false)
  7.     {
  8.         alert("Forum username is required for application submission!");
  9.         return;
  10.     }
  11.     if (validateTwo() == false)
  12.     {
  13.         alert("Your e-mail address is required for application submission!");
  14.         return;
  15.     }
  16.     if (validateThree() == false)
  17.     {
  18.         alert("You need to fill out the text box");
  19.         return;
  20.     }
  21.     alert("Your application was sent successfully! ");
  22.     return;
  23. }
  24. function validateOne()
  25. {
  26.     if (document.Application.name.value == "") return false;
  27.     return false;
  28. }
  29. function validateTwo()
  30. {
  31.     if (document.Application.email.value == "") return false;
  32.     return false;
  33. }
  34. function validateThree()
  35. {
  36.     if (document.Application.text.value == "") return false;
  37.     return false;
  38. }
  39. </script>
  40. </head>
  41. <form name="Application" action="process.php" method="post">
  42. <font face="Arial">
  43.  
  44. Moderator Application form for theonlinefriendsforum.com
  45. <br>
  46. <br>
  47. Something: &nbsp&nbsp<input type="text" name="name" size="20" maxlength="20"><br>
  48. <br>
  49. Email Address**: &nbsp&nbsp<input type="text" name="email" size="30" maxlength="30"><br>
  50. <br>
  51. Info:<br><textarea name="text" name="text" cols="50" rows="10"></textarea><br>
  52. <input type="submit" name="submit" value="Send"
  53. onClick="doSubmit()">
  54. </form>
  55. <font size=2>**Required Information</font>
  56. </html>
I have tried changing some of the falses to true and the true to false but no success, I realy cannot make it so when it says you didnt fill out required and you Click OK it allows you to proceed on filling out the information.
Jul 27 '07 #1
2 1591
epots9
1,351 Expert 1GB
Hello I have this Sendmail Script here that uses Javascript, so when a field is left empty it makes a pop up saying a field was left empty and you click OK but when you click OK it proccesses it and sends the email and I of course do want that done. Here is the code:
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3. <script>
  4. function doSubmit()
  5. {
  6.     if (validateOne() == false)
  7.     {
  8.         alert("Forum username is required for application submission!");
  9.         return;
  10.     }
  11.     if (validateTwo() == false)
  12.     {
  13.         alert("Your e-mail address is required for application submission!");
  14.         return;
  15.     }
  16.     if (validateThree() == false)
  17.     {
  18.         alert("You need to fill out the text box");
  19.         return;
  20.     }
  21.     alert("Your application was sent successfully! ");
  22.     return;
  23. }
  24. function validateOne()
  25. {
  26.     if (document.Application.name.value == "") return false;
  27.     return false;
  28. }
  29. function validateTwo()
  30. {
  31.     if (document.Application.email.value == "") return false;
  32.     return false;
  33. }
  34. function validateThree()
  35. {
  36.     if (document.Application.text.value == "") return false;
  37.     return false;
  38. }
  39. </script>
  40. </head>
  41. <form name="Application" action="process.php" method="post">
  42. <font face="Arial">
  43.  
  44. Moderator Application form for theonlinefriendsforum.com
  45. <br>
  46. <br>
  47. Something: &nbsp&nbsp<input type="text" name="name" size="20" maxlength="20"><br>
  48. <br>
  49. Email Address**: &nbsp&nbsp<input type="text" name="email" size="30" maxlength="30"><br>
  50. <br>
  51. Info:<br><textarea name="text" name="text" cols="50" rows="10"></textarea><br>
  52. <input type="submit" name="submit" value="Send"
  53. onClick="doSubmit()">
  54. </form>
  55. <font size=2>**Required Information</font>
  56. </html>
I have tried changing some of the falses to true and the true to false but no success, I realy cannot make it so when it says you didnt fill out required and you Click OK it allows you to proceed on filling out the information.
change the button from type="submit" to type="button"
then in your javascript if everything is valid call the submit method

Expand|Select|Wrap|Line Numbers
  1. document.getElementById("Application").submit();
  2.  
good luck
Jul 27 '07 #2
Mr aldo
15
change the button from type="submit" to type="button"
then in your javascript if everything is valid call the submit method

Expand|Select|Wrap|Line Numbers
  1. document.getElementById("Application").submit();
  2.  
good luck
Thanks i changed it from submit to button, but Im still new at this. Im not understanding where you put that Javascript code at
Jul 27 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: ratlhead | last post by:
Hi all, Because of a chroot jail a web site that I'm working on is in (I don't know much about the jail stuff), I can't use sendmail to send email through a PHP script. The sys admin said he's...
0
by: Wayno | last post by:
Hoping someone can help me out with this problem. First problem, is I am unable to view my php error log. In my php.ini I have my log in /var/www/logs/php_error_log. However, it has remained empty....
2
by: Babaloo | last post by:
Hello, I am having a problem with PHP 4.2.2 and RH 8. PHP is working fine except email. I have a test script to send mail, I have sendmail_path = '/usr/lib/sendmail -t -i' set in php.ini,...
2
by: STEPHEN GOODE | last post by:
I had a client upgrade his PHP from 4.? to 4.3.9. An important script stopped working. It seems to work fine, but it uses the mail() function and sendmail to send notifications. The email never...
2
by: mike | last post by:
I've spent a couple of days on this and I'm to the "bang-my-head 'gainst the monitor and babble in tongues" mode. First - SuSE Pro 9.3, Linux 2.6.11.4-21.7, Apache 2.0.53, PHP 4.3.10 I have...
6
by: Guern1 | last post by:
Help Please I am very new to the Perl game and need some help I have a Perl application which works fine and can output some plain text information that I need to send to selected users via...
0
by: cgipro2007 | last post by:
Hello I have a perl script that sends an email letter (using sendmail program) to some number of email addresses. However, this mailing list is a little bit long (10,000+ emails) When the...
3
by: digitaldiva | last post by:
Hi I am new here and once upon a time I worked with Perl, now I am trying again and need some help: I wrote a Perl script a few years ago that opened an order entry TXT file and sent each...
2
jhoborg
by: jhoborg | last post by:
Hello all, So I'm having trouble using sendmail in a CGI script as the topic title says. Here's what I'm trying to accomplish: User fills out a form, submits it, my CGI script receives this...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.