Ok I have a website header that I want to call into the page via one line of code such as using a id="myheaderhtml" instead of using the 15 lines of code that originally makes the header. So I want to call the the script from another location. Ill show you exactly what Im talking about..
The code I need to link is below..
So where can I put that code and how could I link to the code so that when I call an ID name or something by using only a line of code it would be the same as if all of the above code was there in the document. Is this possible?Code:<script language="JavaScript" type="text/javascript"> <!-- var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision); if(hasRightVersion) { // if we've detected an acceptable version var oeTags = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"' + 'width="761" height="224"' + 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab">' + '<param name="movie" value="header.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ff9900" />' + '<embed src="header.swf" quality="high" bgcolor="#ff9900" ' + 'width="761" height="224" name="header" align="middle"' + 'play="true"' + 'loop="false"' + 'quality="high"' + 'allowScriptAccess="sameDomain"' + 'type="application/x-shockwave-flash"' + 'pluginspage="http://www.macromedia.com/go/getflashplayer">' + '</embed>' + '</object>'; document.write(oeTags); // embed the flash movie } else { // flash is too old or we can't detect the plugin var alternateContent = 'You do not have the needed plugins to view this website header.' + 'This content requires the Macromedia Flash Player.' + '<a href=http://www.macromedia.com/go/getflash/>Get Flash'; document.write(alternateContent); // insert non-flash content } // --> </script>


Reply With Quote
Bookmarks