?Using java script in wordpress?
-
I have been trying to figure out how to use javascript with in word press posts. I want to call a peice of flash without the nsightly IE box. I have made it so that the header is flash and hard coded that into the template. It works fines like that.
here is the xhtml compliant code I use to call the JS<script type="text/javascript"> //<![CDATA[ if (AC_FL_RunContent == 0) { alert("This page requires AC_RunActiveContent.js."); } else { AC_FL_RunContent( 'codebase', 'https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0', 'width', '100', 'height', '100', 'src', 'https://blog.peakstudois.com/index2', 'quality', 'high', 'pluginspage', 'https://www.macromedia.com/go/getflashplayer', 'align', 'middle', 'play', 'true', 'loop', 'true', 'scale', 'showall', 'wmode', 'window', 'devicefont', 'false', 'id', 'index2', 'bgcolor', '#ffffff', 'name', 'index2', 'menu', 'true', 'allowFullScreen', 'false', 'allowScriptAccess','sameDomain', 'movie', 'index2', 'salign', '' ); //end AC code } //]]> </script> <noscript> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="https://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="100" height="100" id="index2" align="middle"> <param name="allowScriptAccess" value="sameDomain" /> <param name="allowFullScreen" value="false" /> <param name="movie" value="index2.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="index2.swf" quality="high" bgcolor="#ffffff" width="100" height="100" name="index2" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="https://www.macromedia.com/go/getflashplayer" /> </object> </noscript>
when I do this inside a blog it put a “\” before every quote. I have done some debugging on this to find that it happens when the page is created for reading. I found this out by actually placing the code above in a post through the DB. it shows up fine in the DB and is change when you go to the home page. to see what I’m talking about please goto https://blog.peakstudios.com and veiw source.
Thanks!
Quince Wyss
- The topic ‘?Using java script in wordpress?’ is closed to new replies.