Hi,
It sounds like someone is calling Prototype's $() function with an
empty string or an undefined parameter. Prototype doesn't do that on
its own (someone would have noticed), so you'll want to look at the
code making the call, probably in a debugger so you can look at the
call stack. Note that a large number of Prototype's API calls start
out (effetively) like this:
function doSomethingNifty(element) {
element = $(element);
...
}
So the culprit may be a couple of levels up the call stack, not just
one.
FWIW,
--
T.J. Crowder
tj / crowder software / com
Independent Software Engineer, consulting services available
On Feb 19, 1:19 pm, Fernando Gabrieli <[email protected]> wrote:
> Hello all, first of all thanks for Prototype!
>
> i am getting an error from prototype.js, in function:
>
> function $(element) {
> if (arguments.length > 1) {
> for (var i = 0, elements = [], length = arguments.length; i <
> length; i++)
> elements.push($(arguments[i]));
> return elements;
> }
>
> if (typeof element == 'string')
> element = document.getElementById(element); <--------- i get the
> error from here
> return Element.extend(element);
>
> }
>
> It says "Error: Invalid Argument"
>
> dumping element it is an empty string ( element="" )
>
> Do you know what could cause this error ?
>
> Thanks in advance
>
> Best Regards,
> Fernando Gabrieli
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---