Pages: [1] 2
|
|
|
Author
|
Topic: An example why computers hate me. (Read 12686 times)
|
Deep-Jiffa
Enlightened
Offline
Gender:
Posts: 1045
|
Check this perfect code which doesn't work, as always:
<html dir='rtl'> <head> <title>הכנס פרטים בדף זה</title> <script language="javascript"> <!-- function FormCheck(FirstName, FamilyName, EmailAddress, FPassword, Passconfirm) { if (isNaN(FirstName) == false ) {alert("השם הפרטי אינו תקין, אנא הכנס את השם מחדש") ;} if (isNaN(FamilyName) == false ) {alert("שם המשפחה אינו תקין, אנא הכנס את שם המשפחה מחדש") ;}
if (EmailAddress.indexOf("@") == -1 ) {alert("שכחת את השטרודל יקירי!") ;} If (FPassword.length < 6) {alert("הססמה חייבת להיות לפחות 6 תווים!") ;} if (Passconfirm != FPassword) {alert("השדות של הססמה אינם תואמים!") ;} }
//--> </script> </head> <body> <basefont face='arial' color='black'/> <form name='form' action='mailto:groz_f@hotmail.com' method='post'> <table align='center' border='0' width='70%' <tr> <td> <u><font size='+2' face='arial'><center> הכנס את פרטיך כאן: </center></font></u> </td> </tr> <tr> <td> <font size='-1'> - שדות המסומנים ב-* הם שדות חובה </font> </td> </tr> <tr> <td> *שם פרטי: <input type='text' id='Fname' size='18' maxlength='10'/> </td> </tr> <tr> <td> *שם משפחה: <input type='text' id='Familyname' size='18' maxlength='14'/> </td> </tr> <tr> <td> *דואר אלקטרוני: <input type='text' id='email' size='18' maxlength='17'/> </td> </tr> <tr> <td> *סיסמה: <input type='password' id='pass' size='18' maxlength='17'/> </td> </tr> <tr> <td> *חזור על הסיסמה: <input type='password' id='Rpass' size='18' maxlength='17'/> </td> </tr> <tr> <td> ברצוני לקבל אימייל כאשר מוכנס מילות לשירים חדשים: <input type='checkbox' id='c1' checked='checked'/> </td> </tr> <tr> <td> ברצוני לקבל אימייל כאשר מוכנס מידע על הלהקה: <input type='checkbox' id='c2' checked='checked'/> </td> </tr> <tr> <td> ברצוני לקבל אימייל כאשר מוכנס מידע על האלבומים של הלהקה: <input type='checkbox' id='c3' checked='checked'/> </td> </tr> <tr> <td> ברצוני לקבל אימייל כאשר מוכנסת תמונה חדשה של הלהקה: <input type='checkbox' id='c4' checked='checked'/> </td> </tr> <tr> <td> איך היית מדרג את האתר בכלליות? <select id='s1' /> <option value='1'>מעולה</option> <option value='2' selected='selected'>טוב</option> <option value='3'>סביר</option> <option value='4'>גרוע</option> </select> </td> </tr> <tr> <td> איך היית מדרג את העיצוב של האתר? <select id='s2' /> <option value='1'>מעולה</option> <option value='2' selected='selected'>טוב</option> <option value='3'>סביר</option> <option value='4'>גרוע</option> </select> </td> </tr> <tr> <td> איך היית מדרג את תוכן האתר? <select id='s3' /> <option value='1'>מעולה</option> <option value='2' selected='selected'>טוב</option> <option value='3'>סביר</option> <option value='4'>גרוע</option> </select> </td> </tr> <tr> <td> <hr/> הערות:<br/><textarea id='notes' cols='60' rows='4'>הקלד את הערותיך כאן!</textarea> </td> </tr> <tr> <td> <input type='reset' value='נקה טופס'/><input type='submit' onclick="FormCheck(Fname.value, Familyname.value, email.value, pass.value, Rpass.value ) ;" value='שלח\י'/> </td> </tr> </table> </form> </body> </html>
My teacher looked up in the code and said nothing is wrong, again. But still it isn't working. Anyone here got an idea why?
note: If the hebrew annoys you, I will remove it ( all hebrew are non-important in this page...)
|
|
« Last Edit: February 08, 2004, 08:01:57 pm by Deep_Jiffa »
|
Logged
|
Deep Jiffa Owns j00!
|
|
|
FalconMWC
Enlightened
Offline
Gender:
Posts: 1059
Avatar Courtesy of Slyrendro
|
Maybe it is a compiling program in your CPU??
|
|
|
Logged
|
|
|
|
|
FalconMWC
Enlightened
Offline
Gender:
Posts: 1059
Avatar Courtesy of Slyrendro
|
hhmmm....
Try to get someone else to write the same code on your CPU. If it works you know it is you. If it does not - then your CPU is a hater of all humans! - (The the code looks perfectly fine to me)
|
|
|
Logged
|
|
|
|
|
Chrispy
Enlightened
Offline
Gender:
Posts: 917
Vlik Dweller
|
Maybe your computor hates you
|
|
|
Logged
|
|
|
|
FalconMWC
Enlightened
Offline
Gender:
Posts: 1059
Avatar Courtesy of Slyrendro
|
Try using your fiends computer. If that does not work then you know that your CPU hates you so much that it ?boycotted? you!
|
|
|
Logged
|
|
|
|
Culture20
Enlightened
Offline
Posts: 917
Thraddash Flower Child
|
I noticed it's using javascript; were you using the same browser on both computers? javascript works differently in IE and mozilla/netscape. IE tends to auto-fix errors (or sometimes what it mistakenly _thinks_ are errors).
|
|
|
Logged
|
|
|
|
FalconMWC
Enlightened
Offline
Gender:
Posts: 1059
Avatar Courtesy of Slyrendro
|
Go to your friends House and check his/her settings. Good idea Culture20!
EDIT: Yay - I am Smell Controller!
|
|
« Last Edit: February 09, 2004, 06:26:57 pm by FalconMWC »
|
Logged
|
|
|
|
|
FalconMWC
Enlightened
Offline
Gender:
Posts: 1059
Avatar Courtesy of Slyrendro
|
My Gosh DJ - Please, you don't need to flame me! -Sure I "pushed" to get a extra 4 posts to get smell controller. I am sure many here did the same. You don't flame everone you come across that spams for 4 post. Unless you want me to go back and look at your posts.
|
|
« Last Edit: February 09, 2004, 08:43:28 pm by FalconMWC »
|
Logged
|
|
|
|
|
|
Death 999
Global Moderator
Enlightened
Offline
Gender:
Posts: 3873
We did. You did. Yes we can. No.
|
By being around about 5 times longer than you.
D999: 1200 posts since jan 4, 2003. Days: 400 or so. Average: 3 posts per day. FalconWMC: 260 posts since nov 4, 2003. Days: 77. Average: 3.4 posts per day. While we're at it: DJ: 666 posts since jul 24, 2003. Days: 200. Average: 3.33 posts per day Luki: 1114 posts since feb 4, 2003. Days: 370 or so. Average: 3 posts per day Nic: 478 posts since nov 10, 2002. Days: 455 or so. Average: 1.05 per day Kohr-Ah Primat: 496 posts from April 3rd 2003 to Aug 13th 2003. Days: 132. Average: 3.76 posts per day. K-P without her last post: 495 posts from April 3rd to July 24th. Days: 122. Average: 4 posts per day
And it's not quantity... do a user search for KP, Nic, Luki, or myself, or Omni-kun. This isn't chat, saying nothing should be the most common option.
******
As for the code (which is why I am posting in this thread in the first place), I see some simplifications that could be made, like replacing the '== false' constructs with uses of the '!' operator, but that's just a readability issue.
Also, I wonder why you're applying the isNaN function to a string instead of a float or double. However, this is probably just some javascript idiom I'm not aware of.
There are two sketchy things I see about the submit button. First, that it doesn't specify an action to be taken after verifying the data. This may be confused for being no effect, if the data is valid. Second, the submit button input tag ends with '/>' instead of '>'. This may be legal, but I'm not sure.
|
|
|
Logged
|
|
|
|
JonoPorter
Enlightened
Offline
Gender:
Posts: 656
Don't mess with the US.
|
have you tried inverting the polarity? its works in every sci fi show.
but really the lack of comments makes me not even want to look at the code. add comments then we can talk.
|
|
|
Logged
|
|
|
|
Pages: [1] 2
|
|
|
|
|