treehouse : what would you like to learn today?
Web Design Web Development iOS Development

javascript problems

  • Hey guys,

    Lately I've been working on a mobile start page for my Nintendo DS. It worked fine when I had just three items--Gmail, AIM and a quick URL bar--but as soon as I added a few more things it broke, and I have no idea why. It might not even be the javascript, for all I know. I have just been looking at these pages for far too long and need another set of eyes.

    All the styling and script is in the page itself, so don't worry about finding it.
  • U are tying to access an element that doesnt exist.

    when u click on an item u get the error:

    document.getElementById("bookmarksframe") has no properties
    [Break on this error] var Bookmarksdiv = document.getElementById('bookmarksframe').style;

    delete them out of your codes and it would work , i think ;)
  • Yep I think it's a problem with the exact names of the ID's you are trying to reference. See the firebug screenshot:

    http://css-tricks.com/forum-pics/javascripterrors.png

    It looks like maybe the ID you are trying to target is "bookmarkstab" and not "bookmarksframe"?
  • Well, I did a find/replace for bookmarksframe/bookmarkstab, and that made it work, except it also got rid of the button for it. And it seems the URL button doesn't work at all anymore?

    The problem here is that I really am just no good at javascript at all.
  • Install firebug... http://www.getfirebug.com (enable firebug for this website) , reload, check the errors. debug.
  • Unfortunately I use Firefox 3b5. I guess I could install it on Virtual PC, though.
  • same here. install the 1.1 Beta version of firebug, it will work.

    only activate it when u need it. else it will crash FF biggies. especially on gmail o.o