I have a “javascript_include_tag” including a Javascript function.
I have a function being invoked via a helper in the same view, which
prints
out a script tag that uses the javascript function above.
Problem is, the function being invoked via the helper can’t find the
javascript function included in the “javascript_include_tag”.
I hardcoded the javascript that exists in the “javascript_include_tag”,
into
the head of the view… and the helper had no problem finding the
method.
So… it seems that the helper is being invoked before the
“javascript_include_tag” declaration ?
Why not just include the javascript file in the tag? Can you post
the code you are using?
-Jonny.
Dylan S. wrote:
I have a “javascript_include_tag” including a Javascript function.
I have a function being invoked via a helper in the same view, which
prints
out a script tag that uses the javascript function above.
Problem is, the function being invoked via the helper can’t find the
javascript function included in the “javascript_include_tag”.
I hardcoded the javascript that exists in the “javascript_include_tag”,
into
the head of the view… and the helper had no problem finding the
method.
So… it seems that the helper is being invoked before the
“javascript_include_tag” declaration ?