Forum Moderators: open

Message Too Old, No Replies

accessing an external js script

         

nunoragil

4:47 am on Mar 28, 2005 (gmt 0)

10+ Year Member



Dear listers,
I'm declaring an external javascript file with a function in the head section of a html file. I would like to call that same function but from another html file without including again the its path on the head section of this second html file. How can I call the function on this second html file so it knows where to find the function source code loaded externaly in the first html?
Thanks for all the help.
Gil

JAB Creations

5:35 am on Mar 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You're trying to call a JS function from an HTML source? You always have to tell the HTML document where the javascript source directly is with either a relative or absolute path.

This sounds like an attempt to protect a javascript so if it is be forwarned that if it's clientside it can be found. I hope this answers your question.

nunoragil

1:53 pm on Mar 28, 2005 (gmt 0)

10+ Year Member



thanks JAB,
The problem now is calling an external js file inside a function. This function is included inside the BODY section of an html page and I cannot include the external js path in the HEAD, everything needs to go inside the BODY function.
Any idea? Thank you,
Gil

JAB Creations

8:22 pm on Mar 28, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



CAn't help you unless you post your code. Both HTML and JS files please in full.