PDA

View Full Version : Calling external Javascript Link


XDakotaX
06-04-2005, 09:46 AM
Hi guys,

This is a little more complex than just calling the standard external .js file so I will try and explain this as best as possible.

I had an html page which I wanted to load externally into another html page.
I converted the html to javascript and it is now sitting as a seperate file on my server XXXX.js

I now want to call this .js file to load into my initial html page BUT
My html page is heavily scripted and does not allow pure javascript to be loaded in it. The only way I can get JS on my site is to paste coding into the header which loads with every page.

<SCRIPT language="JavaScript" SRC="/xxx.js"></SCRIPT> Is present in my website header.

Obviously it will load in the page due to being present in the header. My question is how do I call the external call script to appear in a precise position on my HTML page?

It seems a very round a bout way of doing things.

HTML PAGE --1-> Header ---> external js command ---> Javscript file

Thats more or less the layout. But the link labelled (1) is where the breakdown is occuring.

Can anyone help?

Thanks in advance!

_Aerospace_Eng_
06-04-2005, 11:36 AM
So basically the script is made up of document.writes? You don't HAVE to put it in the head tags, thats the general rule for scripts that don't have document.writes to them. You can put it any where you like on your page. So is that what you were wondering? Using javascript to call page into your page is just as bad as using an iframe so why not use an iframe?