Link to home
Start Free TrialLog in
Avatar of jerute
jerute

asked on

Problem with javascript includes

I have an issue with javascript includes that constantly gets me.

Whenever I include some javascript, then add another block of javascript code, it seems to 'forget' the first block that I have included.

The error reported is 'SWFObject is undefined'

I'm missing something obvious, but could somebody tell me what...

Thanks in advance.
<title>Test Site</title>
	
	<script type="text/javascript" src="swfobject.js"></script>
	
	<script type="text/javascript">
	function loaded()
	{
		var so = new SWFObject("movie.swf", "mymovie", "400", "200", "8", "#336699");
		so.write("flashcontent");
	}
	</script>
	
</head>
<body onload="loaded();">
 
	<div id="flashcontent">

Open in new window

Avatar of zemond
zemond

are u saying that

      function loaded()
      {
            var so = new SWFObject("movie.swf", "mymovie", "400", "200", "8", "#336699");
            so.write("flashcontent");
      }
      </script>

is causing


<script type="text/javascript" src="swfobject.js"></script>

to fail?
ASKER CERTIFIED SOLUTION
Avatar of jerute
jerute

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial