User Profile
Collapse
-
Did you get it fully working ? I am doing the same thing and it's driving me mad. I have nearly got it working but would love a peek at the working code if you could post it ! -
Hail the Conquering Hero! ( cue Fanfare)
I sussed it out ( after only 4 houres of staring at it( lol)
The if then else statement in isAlreadySelect ed was wrong!
It was returning True/False after the first comparison, hence it was only ever comparing ther first value of the array.
by moving the 'else' instructions to the very end of the For loop, it meant that if it matched a value, - return... -
Hmm, - I'm using FireFox. (V 3.0.10 () ( I never use IE.)
as regards your other point, I totally agree, however on one of our earlier assignments I got marked down for adding extra functionality, was told to stick specifically to the specifications given.
I don't understand why it works for you & not for me! on mine, it seems to dislike the first number entered, then accepts any after (except the first number selected)....Leave a comment:
-
Thanks again for your continued assistance
1> fixed
2> it does state tin the Asignment question that
I have now got the blasted thing working-ish (see my previous post) except for it seems to think (even though all the elements were set to 0) that as the first number chosen, '1' was deemed as a duplicate? I then put 3,3,3,3 & it accepted them all in.
Therefore, it's almost...Leave a comment:
-
as regards my isue, - I think I found it...
I think I'm placing to much faith in my coding.
from working through it, on Line 74 it's passing through the array chosenNumbers full of zero's! , I need to be filling that with the selected numbers as is go.
Whoops. ...back to work!Leave a comment:
-
-
Ok, - I have made all the tweaks you pointed out (*looks sheepish*)
And it seems to be working,
Initially it wasn't iterating through to ask repeated number entries but that was easy enough to rectify.
My issue now is that it either isn't correctly calling isAlreadySelect ed, or it is and I'm not manipulating the 'true/false' output correctly.
I tried to obtain Firebug to do a stepthrough, but the...Leave a comment:
-
Righty Ho, - Feel I may have rushed that somewhat.
thanks for the advice, I'll do some major revisions & come back.
(I hate the capitalisation issue)Leave a comment:
-
Thank you very much to Dormilich for helping me out.
I'm still learning JS & hadn't used many object outputs etc.
I have now got it working so am very grateful. (on to the next one <sigh>)Leave a comment:
-
I just realised I was missing the top level '}' bracket under that function.
Have added it, but still no joy.Leave a comment:
-
Odd Error (Function not Defined)?
Hi, I'm currently working on this piece of code & unfortunately, whenever I run it, it states that selectNumbers isn't defined and it errors on Line 1 (?)
can anyone tell me why? I'm tearing my hair out!
Code:<HTML> <HEAD> <TITLE>M150 TMA 5 : Programming : Task 3 - User selection of balls</TITLE> <SCRIPT language="JavaScript">
-
Hmm, - OK, I think I get what you mean, I'll have a crack at solving it & let you know how I get on,..
thanks for the guidance.Leave a comment:
-
Issue with [object HTMLInputElement] appearing in output box.
Hey there, Just wanted to say Hi. - I'm new on here & have drifted here as I'm having a minor problem I was hoping someone could assist ...?
(for some reason I couldn't post this directly into the Javascript forum, don't seem to have a 'New Thread' button)
Am working on a 'lottery drawing program' for an assignment, so far have coded the below, but for some reason, on the output page, it keeps putting
[object...
No activity results to display
Show More
Leave a comment: