Results 1 to 5 of 5

Thread: function call from event not working ???

  1. #1

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,390

    function call from event not working ???

    y is this not working???

    <script>
    function appendXML() {
    .............................
    }
    </script>

    <span onclick="appendXML;"> bla bla </span>

    thanks Kris

  2. #2
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177
    You need to make this change:

    <span onclick="appendXML();"> bla bla </span>

  3. #3

    Thread Starter
    PowerPoster i00's Avatar
    Join Date
    Mar 2002
    Location
    1/2 way accross the galaxy.. and then some
    Posts
    2,390
    nope still not working :S

  4. #4
    Frenzied Member Acidic's Avatar
    Join Date
    Sep 2003
    Location
    UK
    Posts
    1,090
    Then there is an error in the JS, maybe you've forgotten a {,},(,) or ".
    Have I helped you? Please Rate my posts.

  5. #5
    Evil Genius alex_read's Avatar
    Join Date
    May 2000
    Location
    Espoo, Finland
    Posts
    5,538
    Code:
    <script>
    function appendXML() {
        alert('Hello World');
        /* comment out all other code in function */
    }
    </script>
    
    <span onClick="javascript: appendXML();"> bla bla </span>
    As above, it probably is being called, but there could be an error in the js code. Try changing this to match the above & run it...

    Please rate this post if it was useful for you!
    Please try to search before creating a new post,
    Please format code using [ code ][ /code ], and
    Post sample code, error details & problem details

Posting Permissions

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



Click Here to Expand Forum to Full Width