The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
Right, basically I'm trying to write a swear checker function. The code is this:
The swear checker itself seems to work - it chucks up an alert if any of the words are found - but what it doesn't do is stop the form from doing it's action. So even if the alert comes up, the 'return false;' part of it never seems to get through and I really don't know why.
As well as that in the alert, if there's more than one word, there's always a comma before every word after the first and I cannot ascertain as to why.
Any ideas?
Cheers.
Change:
Regarding your first problem, I would hazard a guess it's to do with the value being returned. If the line:
Right, basically I'm trying to write a swear checker function. The code is this:
The swear checker itself seems to work - it chucks up an alert if any of the words are found - but what it doesn't do is stop the form from doing it's action. So even if the alert comes up, the 'return false;' part of it never seems to get through and I really don't know why.
As well as that in the alert, if there's more than one word, there's always a comma before every word after the first and I cannot ascertain as to why.
Any ideas?
Cheers.