0

Hi, I am in a unusual situation and cannot get my JavaScript to work. I need to have all of my JavaScript in one external file that I link to in the header. However, some of the JavaScript in that external tag needs to appear in a certain place in my body. However, because it is being linked to in the header I cannot get it there.

Is there anyway to have an external JavaScript file contain some JS that appears in the header and some that appears in the body? I'm at a loss and any help would be greatly appreciated. Thank you.

3
Contributors
4
Replies
5
Views
7 Years
Discussion Span
Last Post by P0lT10n
0

You are losting precision.
Post your code to enable us to help you.
Probably, you are getting error in the link.

0

Sorry for the lack of detail.

The code that needs to be in the body is this:

$("#flashcontent").flash(
			{
				"src": "flash/fonts.swf",
				"width": "1",
				"height": "1",
				"swliveconnect": "true",
				"id": "fontshelper",
				"name": "fontshelper"
			}
		);

And then there is a <div id="flashcontent"></div> Which is needed for the function to work. Right now I am trying to make it so that it does not need this div and the JavaScript can stay in the header and still work.

Edited by turverey: n/a

0

try to put this in your script tag:

<script type="text/javascript">
$("#flashcontent").flash(
			{
				"src": "flash/fonts.swf",
				"width": "1",
				"height": "1",
				"swliveconnect": "true",
				"id": "fontshelper",
				"name": "fontshelper"
			}
		);
</script>

If don't work, try this:

<script type="text/javascript" src="location/of/scriptarchive.js" />

If don't work anyway, post the complete code
with the javascript and the HTML for analisys.

I'll try to run it, OK?

Enjoy. :)

0

What will do your .swf file ??? You want to change font of the div ??? If i am right, you can use CSS and put your own .TTF file and will work. If not tell better what do you want to do with the .swf and put all the source :)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.