[ic] linking to external javascript file from IC template?
Ryan Hertz
interchange-users@interchange.redhat.com
Tue Apr 16 15:08:01 2002
At 02:27 PM 4/16/02 -0400, Aaron Hazelton wrote:
> > You can do it via IC's include:
> > [include file="/path/to/yourjavascript.js"]
> >
> > Or you could do it the HTML/JS way:
> > <script src="/path/to/yourjavascript.js"></script>
> >
> > Using the IC include method will allow you to embed IC markup in the
> > javascript. The script source method may be more efficient
> > for "static"
> > code in that some browsers may cache the script. Or you
> > could even have
> > the <script> source tag inside an [include]d HTML file to
> > perhaps reap the
> > best of both worlds.
> >
> > -r
>Sounds great, but im getting it right I guess. Im not even getting any
>errors and its not even trying to build.
[snip]
Not even trying to build? That rings a bell for me.
Chances are that your javascript menu needs to be invoked when the page
loads, typically with a <BODY OnLoad=foobar>-type scenario. Do you have
code to do such anywhere in your IC pages? Doesn't sound like it.
If you don't want to muscle it into the <BODY> tag of your pages, you might
be successful with putting a <script>DoMenus()</script> or whatever in the
footer area of your pages. And further, you should do some testing in
your secure space, as you may find that some modifications will be needed
to have your menus work in SSL.
Other than that, I fear that this thread is dangerously off-topic -- so
hopefully this helps you.
-r