Follow Us
  • Register
Errorbase is a collaborative writing project, that aims to build the largest trouble-shooting guide about all kinds of error messages.


0 votes

After page load, i'm trying to create a span that needs to be call a function, but i get following error on firebug console;

Full message: uncaught exception: [Exception... "Not enough arguments [nsIDOMWindowInternal.alert]" nsresult: "0x80570001 (NS_ERROR_XPC_NOT_ENOUGH_ARGS)" location: "JS frame :: :: scrollTo:: line XXX" data: no]

The code that i wrote,

if(documentHeight > windowHeight) {
     scrollSpan = $('',{
     id   : 'scrollSpan',
     html  : 'Scroll to top',
     click  : scrollTop
function scrollTop(){
  $('body').animate({ scrollTop: 0 }, 'slow');
   return false;

The above code creates span element successfully, but when i click the span, it does not fire the scrollTop function, and it gives an "uncaught exception" error. I don't see any problem in my code, do you?

requested by (520 points)

Please log in or register to to add a solution for this error.