Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Noob question, javascript apparently not running

    Hi all,

    I sincerely apologise for the noob question. I have search and searched for an answer but to no avail, so I hope someone on here can help.

    I'm trying to get a fisheye verticle menu working. I've found somethin which fits the requirement here: http://zendold.lojcomm.com.br/ifisheye/ and tried to make it work. It just doesn't.

    I've tried different versions of mootools etc but I think I'm missing something really stupidky simple. I'd really appreciate it if someone could have a look at my temp page (http://www.parkerbs.com/home1.htm) and point me in the right direction.

    Many thanks in advance.

    Paul

  • #2
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,394
    Thanks
    13
    Thanked 353 Times in 349 Posts
    there is an error in your script: "Class is not defined", seems like you’re missing a function definition.
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  • #3
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hi Dormilich,

    Thanks so much for replying. I had just copied the code from the site, put it in a library and called it from the HTML, so I assumed it should work.

    http://www.parkerbs.com/home2.htm is another one that I got from a different website and can't get to work, which is why I thought it must be me.

    If you think I'm doing my bit correctly but the scripts are to blame, then thanks for your help, I'll go back to the authors.

  • #4
    Regular Coder
    Join Date
    Aug 2002
    Location
    San Francisco
    Posts
    455
    Thanks
    19
    Thanked 15 Times in 15 Posts
    I notice that the load_app function is inside a script tag that doesn't say type="text/javascript." That might be a factor. I would suggest putting all of your internal scripts inside of one script tag; I would also suggest putting all of your internal styles inside of one style tag. It makes it a bit easier to read and debug. You may also want to look at the original pages and make sure you grabbed all of the javascript files and have and organize them in the same manner as the originating site; they may be looking for files in a specific place and not finding them, which would result in an error.
    Outside of a dog, a book is man's best friend. Inside of a dog it's too dark to read. Groucho Marx

  • #5
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    26,576
    Thanks
    80
    Thanked 4,496 Times in 4,460 Posts
    Quote Originally Posted by marilynn.fowler View Post
    I notice that the load_app function is inside a script tag that doesn't say type="text/javascript." That might be a factor.
    Theoretically, maybe.

    In practice, almost surely not.

    There are thousands, if not millions, of old HTML pages out there on the net that were created long before "text/javascript" was used, let alone became a standard. The browser that stops recognizing that <script> is a common shorthand for <script type="text/javascript"> is the one that people will stop using, because all their web browsing stops working.

    Sad, but true, that all these standards just aren't enforceable.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #6
    New to the CF scene
    Join Date
    Nov 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for your help. The author of the script i had been using got in touch and sent me a working version.

    Appreciate the assistance!

    Paul


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •