| Author |
Message |
Achaean Regular


Joined: Mar 22, 2004 Posts: 64 Location: Missouri, USA
|
Posted:
Sun Apr 04, 2004 8:30 pm |
|
Hey,
I recently programmed Onchange into my recruitment page, to alert people with a popup if the e-mail address they entered was incorrect, however I think that it is conflicting with phpnuke, so I was wondering how to fix it, I got it from
my code is
| Code: | <SCRIPT TYPE="text/javascript"> <!-- function checkEmail(email) { if(email.length > 0) { if (email.indexOf(' ') >= 0) alert("email addresses cannot have spaces in them"); else if (email.indexOf('@') == -1) alert("a valid email address must have an @ in it"); } } //--> </SCRIPT>
<FORM ACTION="mailer.php" method="post">
<MH HIDDEN><center><U>1stAD Recruitment Form</U></center></MH><br><br>
<center>Please Fill out the following form, we will get back to you shortly: </center>
<P>Your Battlefield Name? <INPUT NAME="BF_Name" SIZE="30">
<P>Have you been in a clan before (Check if yes) <INPUT NAME="Previous_Clan" TYPE=checkbox>
<br><br>Explain?<br><br>
<TEXTAREA NAME="Explanation" COLS=48 ROWS=3></TEXTAREA> <P>Which games do you play?
<UL> <LI>Battlefield 1942 <INPUT NAME="BF1942" TYPE=checkbox VALUE="Yes">
<LI>Medal Of Honor <INPUT NAME="Medal Of Honor" TYPE=checkbox VALUE="Yes">
<LI>Call of Duty <INPUT NAME="Call of Duty" TYPE=checkbox VALUE="Yes">
<LI>Battlefield Vietnam<INPUT NAME="Battlefield Vietnam" TYPE=checkbox VALUE="Yes">
<P>Other? <INPUT NAME="Other_Games" SIZE="30">
<P>Location? <INPUT NAME="Location" SIZE="30">
<P>Age? <INPUT NAME="Age" SIZE="20">
<P>Your E-mail Address? <INPUT NAME="email" onChange="checkEmail(this.value)" SIZE="30">
<P>MSN Instant Messenger? (Put N/A if none) <br><br><INPUT NAME="MSN" SIZE="27"><br><br><br>
<LI>Tell us about yourself, and why you decided to try out for the 1stAD:
<br><br><TEXTAREA NAME="Myself" COLS=48 ROWS=6></TEXTAREA> </UL>
<br><P><center>Thanks for filling out our recruitment form, we will get back to you shortly!</center><P ALIGN=CENTER><INPUT TYPE=Submit> <INPUT TYPE=reset> </FORM>
|
Can anyone help?
the site is |
|
|
 |
 |
Achaean Regular


Joined: Mar 22, 2004 Posts: 64 Location: Missouri, USA
|
Posted:
Sun Apr 04, 2004 9:33 pm |
|
|
 |
 |
Rikk03 Worker


Joined: Feb 16, 2004 Posts: 164
|
Posted:
Mon Apr 05, 2004 12:17 am |
|
Any idea what part of nuke it is conflicting with?
What are the symptoms? |
|
|
|
 |
Achaean Regular


Joined: Mar 22, 2004 Posts: 64 Location: Missouri, USA
|
Posted:
Mon Apr 05, 2004 6:49 pm |
|
thats my question to you guys hehe , just says error on page when after you do this action in the small directory part of the site at the bottom.  |
|
|
 |
 |
Achaean Regular


Joined: Mar 22, 2004 Posts: 64 Location: Missouri, USA
|
Posted:
Thu Apr 08, 2004 10:29 pm |
|
|
 |
 |
sixonetonoffun Spouse Contemplates Divorce

Joined: Jan 02, 2003 Posts: 2499
|
Posted:
Fri Apr 09, 2004 6:34 pm |
|
What are you using as a text editor? I haven't tried this script but it looks like the semi colons are sposed to be the end of line but its all on one line?
Why are you using java for all this? You could do a couple simple checks in php that would be more reliable and would still work for those of us who don't use java while surfing strange sites. You could check out the code in any of the contact us or recomend us modules its pretty easy to follow. |
|
|
|
 |
Achaean Regular


Joined: Mar 22, 2004 Posts: 64 Location: Missouri, USA
|
Posted:
Fri Apr 09, 2004 9:32 pm |
|
ok ill try the php codes for one, do you know any good sites or code for it? |
|
|
 |
 |
sixonetonoffun Spouse Contemplates Divorce

Joined: Jan 02, 2003 Posts: 2499
|
Posted:
Fri Apr 09, 2004 10:10 pm |
|
If your making a form that gets mailed to yourself you could just clone the feedback module (Though its not the prettiest thing) add your fields to that and for each required new field add a check to see if its not empty. Who really cares if the address has @ in or spaces. If they want to put in a invalid address they will happens all the time no matter how well the form checking is. If you change it to html headers for better formatting I'd add some filtering to the $_POST variables they aren't filtered at all if I remember correctly.
htmlspecialchars(strip_tags($var))
Should do the job. |
|
|
|
 |
|
|
|
|