PDA

View Full Version : whats wrong here??


Mgkeeper
10-28-2002, 12:20 AM
I have attached a file with a quiz script i want you js programmers to look over. When i run it, and try to answer a question, it give me a script error on line 451 character 1. Can you tell me whats wrong??

Gordo
10-28-2002, 12:23 AM
No file attached.
:o

Mgkeeper
10-28-2002, 12:24 AM
lmao, my bad.......

glenngv
10-28-2002, 01:12 AM
you've got the click() function and succeeding functions commented.
whatever editor you are using, turn the word wrap off and you will see the comment beginning with

// Message for the alert box...

HappyDude
10-28-2002, 01:13 AM
I'm pretty sure the entire problem was a formatting error... I downloaded your text file and saved it as an html file, which gave me errors. However, if instead of saving it as an html file, I simply changed the extension to .html, it worked fine. It also worked fine when I copy & pasted the entire text into an html editor and saved it. I think the problem is that notepad removes the linebreaks when you try using it to save it as an html file, which causes problems.

Mgkeeper
10-28-2002, 01:16 AM
put im using php, so it needs to be text

Mgkeeper
10-28-2002, 01:22 AM
oh no, i attached the working file. Heres the bad file

HappyDude
10-28-2002, 12:40 PM
What are you using to write your html/javascript files? Your text editor seems to remove all of your line breaks, which is causing the problem.

Mr J
10-28-2002, 03:04 PM
Sorted .... I think

Mgkeeper
10-28-2002, 08:38 PM
yay, it worked. Thanks alot Mr. J!!! Lol, can i ask another favor, can you fix this one too? Ill never ask again, its just that i already finished the q's on this 1, and i dont wanna have to type them in again........btw, how did you fix the prob??

Mgkeeper
10-28-2002, 08:39 PM
here's the file

Mr J
10-28-2002, 09:56 PM
Theres seems to be a mystery as to how it has been saved, to disregard the formatting .........strange ...... as they say


;)

HappyDude
10-28-2002, 10:55 PM
I think that what Mr J did was press ENTER and add in line breaks in the necessary spots. Whatever you're using as a text or html editor isn't saving the line breaks, which is causing the problems.

Mgkeeper
10-29-2002, 01:46 AM
hey thanks alot guys for your help. I used notepad for it. There must've been an error, because it always worked good with js before...........

whammy
10-29-2002, 01:55 AM
Notepad stinks... try using EditPad Lite (free) from www.jgsoft.com or something along those lines... I have about 12 text editors, and I'm still evaluating most of them, but I like editpad the best so far for plain text editing and search/replace...

Mgkeeper
10-29-2002, 02:05 AM
well, i mean i dont use notepad for all my stuff. Its just to usually change a little code in an already finished script, ya know??

chrismiceli
10-29-2002, 03:45 AM
in my opinion the best txt editor for windows is metapad, do a search on google, it is like notepad on Crack, lol :)

Mgkeeper
10-29-2002, 08:24 PM
ok, ill do that, and thanks for the help everyone!!!!

:thumbsup: :) :D :p

beetle
10-29-2002, 08:32 PM
Textpad. All the way.

www.textpad.com