P
Pink Pig
(I don't know if this question has been asked and answered many times,
since I just joined this group and haven't attempted to search the
archives.)
I have a page under construction which uses jQuery and is fairly
massive. When I run it locally under Firefox, everything works fine,
but when I run it on the host site, I frequently run into difficulties
of the following type. I have a $(document).ready() function that
references variables and elements defined either in other JS scripts
(inline), or in the HTML. Sometimes, but not always, a reference to
one of these variables or elements resolves to a null pointer, which
aborts the execution of my $(document).ready() function and causes FF
to get hung up in the wrong place. For example, I have a JS variable
called 'calimg', which is supposed to be a string containing the URL
of an image file, and if I look at the source, that is how it is
defined, in a script that is placed before the script containing the $
(document).ready() function. But often, Firebug reports that the
variable 'calimg' is not defined when the $(document).ready() function
runs. What is causing this, and what can I do about it?
since I just joined this group and haven't attempted to search the
archives.)
I have a page under construction which uses jQuery and is fairly
massive. When I run it locally under Firefox, everything works fine,
but when I run it on the host site, I frequently run into difficulties
of the following type. I have a $(document).ready() function that
references variables and elements defined either in other JS scripts
(inline), or in the HTML. Sometimes, but not always, a reference to
one of these variables or elements resolves to a null pointer, which
aborts the execution of my $(document).ready() function and causes FF
to get hung up in the wrong place. For example, I have a JS variable
called 'calimg', which is supposed to be a string containing the URL
of an image file, and if I look at the source, that is how it is
defined, in a script that is placed before the script containing the $
(document).ready() function. But often, Firebug reports that the
variable 'calimg' is not defined when the $(document).ready() function
runs. What is causing this, and what can I do about it?