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 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Error saying a global variable is undefined

    I've been working at this for a couple of days now, and can't figure it out. I have defined my own menu object, and have made a global instance of it (m). I am using the document.write method to write out a link which should execute one of my functions (using the global instance as a parameter). For some reason when I click on it, I get the error "'m' is undefined". However, if I type the link into the body manually, it works just fine. Any help would be greatly appreciated. Thanks!!

    BTW - I've attached my code. Please note that this has been simplified from the original version which used frames, so the LoadMain function is incorrect. I just wanted to get the function calls going first, and then I'll worry about the display.

    Thanks again
    Attached Files Attached Files

  • #2
    New to the CF scene
    Join Date
    Mar 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for all who may have taken the time to look at this; however, the problem has been solved.

  • #3
    Kor
    Kor is offline
    Red Devil Mod Kor's Avatar
    Join Date
    Apr 2003
    Location
    Bucharest, ROMANIA
    Posts
    8,478
    Thanks
    58
    Thanked 379 Times in 375 Posts
    document.write method
    ...should have used DOM methods instead of document.write() probably you would avoid the error...
    KOR
    Offshore programming
    -*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


  •  

    Posting Permissions

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