D
darrel
I have a need to load javascript functions for various parts of our site.
Normally, when making a page, we link to the javscript function within the
HEAD tags and reference them as needed within the contents of the page.
However, all of our content is being loaded by a user control already within
the BODY of our page.
What's the best way to handle this?
Should the UC that loads within the body tag somehow communicate with the UC
that loads the links in the HEAD tags to let it know that we need a
particular .js link? If so, what's the best way to pass that info to that
UC? I could just have that UC query the DB as well, but 99% of the time,
that'd be a pointless thing, as usually we wouldn't need a .js link up there
(of course, this would be an easy solution to implement).
Alternatively, any reason to not just load the .js that is needed within the
BODY of the page itself?
-Darrel
Normally, when making a page, we link to the javscript function within the
HEAD tags and reference them as needed within the contents of the page.
However, all of our content is being loaded by a user control already within
the BODY of our page.
What's the best way to handle this?
Should the UC that loads within the body tag somehow communicate with the UC
that loads the links in the HEAD tags to let it know that we need a
particular .js link? If so, what's the best way to pass that info to that
UC? I could just have that UC query the DB as well, but 99% of the time,
that'd be a pointless thing, as usually we wouldn't need a .js link up there
(of course, this would be an easy solution to implement).
Alternatively, any reason to not just load the .js that is needed within the
BODY of the page itself?
-Darrel