|
|
 |
Re: FN-FORUM: javascript error
date posted 5th January 2005 19:52
That was it - thanks - Stupid me. I knew the original was working so I
didn't look hard enough.
Pam
----- Original Message -----
From: "Dai Williams" [EMAIL REMOVED]
To: [EMAIL REMOVED]
Sent: Wednesday, January 05, 2005 8:22 PM
Subject: RE: FN-FORUM: javascript error
>
>
>> -----Original Message-----
>> From: PAMELA WHITTAKER [EMAIL REMOVED]
>>
>> function validcontents(inputbox) {
>> var teststring;
>> var outputstring;
>> teststring = inputbox.toString();
>> if (inputbox == "") {return false}
>> if (isblank(teststring)) {return false}
>> if (!isNaN(outputstring)) {return false}
>> if (outputstring.length < 2) {return false}
>> return true;
>> }
>>
>> function validcontents1(inputbox) {
>> alert("gg");
>> var teststring;
>> var outputstring;
>> teststring = inputbox.toString();
>> if (inputbox == "") {return false}
>> if (isblank(teststring)) {return false}
>> if (isNaN(outputstring)) {return false}
>> return true;
>> }
>
> Um, those functions are a "bit" messed up - outputstring is declared but
> not initialised then used in tests, inputbox is tested against empty
> string but from your previous code should be an object, then several
> calls which look like they could be simplified quite apart from
> operating on the wrong variables.
>
> I suggest you decide what the functions are supposed to do and then test
> them in a simple piece of test code and rewrite them until they do what
> they should, then put them back into the live page.
>
> Also my previous comment stands - there must have been javascript erros
> generated here, so I guess you have javascript error notification
> switched off which is not a good idea if you are testing javascript
> code.
>
> Dai
>
> TechnologyAngel
> http://www.technologyangel.co.uk/
>
>
>
> --
> Freelancers, contractors earn more with Prosperity4
> Call 0870 870 4414 or visit www.prosperity4.com
> and benefit from Inland Revenue approved expenses today.
>
> To advertise here: http://www.freelancers.net/advertising.html
>
> |
 |
|