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
    Dec 2008
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Exclamation Javascript Stickies App not working

    Hey.

    I must have a syntax error, because this function crashes the entire script (even the other functions).

    [HTML]
    function newNote()
    {
    allNotes = document.getElementById('notes-stickies-app').innerHTML;
    secondadder = 1;
    noteTotal = n+secondadder;
    alert(noteTotal);
    document.getElementById('notes-stickies-app').innerHTML=allNotes+'<div id="note'+noteTotal+'-stickies-app" class="stickiesYellow" style="width:100px; height:100px;" onclick="selectNote(\'note'+noteTotal+'\');" onmouseup="stopMovingStickiesNote();" onmousemove="keepMovingStickiesNote();" onmousedown="startMovingStickiesNote(\'note'+noteTotal+'\');">
    New Note.
    </div>';
    n = noteTotal;
    }
    [/HTML]

    URL: http://71.193.112.221:8888/tools/javascript_os.html

    EDIT: to get to the stickies part, click the apple menu, and click stickies. you'll see how the stickies wont drag because this script that adds new stickies has a problem.

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,240
    Thanks
    203
    Thanked 2,554 Times in 2,532 Posts
    New Note.
    </div>';



    Outside a secondhand shop: WE EXCHANGE ANYTHING - BICYCLES, WASHING MACHINES, ETC. WHY NOT BRING YOUR WIFE ALONG AND GET A WONDERFUL BARGAIN?

  • Users who have thanked Philip M for this post:

    sawmaster (03-19-2009)

  • #3
    New to the CF scene
    Join Date
    Dec 2008
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Thumbs up

    Quote Originally Posted by Philip M View Post
    New Note.
    </div>';



    Outside a secondhand shop: WE EXCHANGE ANYTHING - BICYCLES, WASHING MACHINES, ETC. WHY NOT BRING YOUR WIFE ALONG AND GET A WONDERFUL BARGAIN?
    Awesome! Thanks! It works 100% now!


  •  

    Posting Permissions

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