Click to See Complete Forum and Search --> : Need help with two (probably simple) problems
justinp
11-21-2003, 01:34 PM
I can't get the unordered search to return a true value on this page (it's at the bottom in the code)
http://www.jasonharbourdesign.com/~justin/lab6.html
And I just have no idea what to do here, to get it to work
http://www.jasonharbourdesign.com/~justin/lab5.html
Any help is appreciated, thanks
TheBearMay
11-21-2003, 01:41 PM
I looked at the second one first and at a glance at line 46
function GetElement
{....
should be
function GetElement()
{...
justinp
11-21-2003, 01:43 PM
Well that will solve one problem, later on. Thanks
I'm terrible at this stuff :(
TheBearMay
11-21-2003, 01:44 PM
First one:
In the function UnOrderedSearch(key) you haven't declared "n" as a variable.
TheBearMay
11-21-2003, 01:47 PM
Easy way to spot errors is to turn on the option in your browser that reads something similiar to "Display notification about script errors".
justinp
11-21-2003, 01:49 PM
I had that on, but it tells me there are errors on lines that it isn't possible for there to be errors on.
And I don't need to declare n do I? Since n is the text box input.
TheBearMay
11-21-2003, 03:30 PM
It's used as a local variable there, which means outside of the function it doesn't exist.
As to the line numbers they're generally pretty good for me, but get a little fuzzy when you have external JS files being pulled in. Also need to watch line wrapping on some editors.