Could you be more specific in where you would like to add it?
Would you like to add it to a Page/Post in the admin-section (so you can use it there for a specific plugin or something like it), do you want to add it to every page (which would mean you’d have to edit your theme-files) or do you want to be able to have the javascript added to one page/post and not the other (which would mean you should use the custom-fields, my favourite plugin for that is more-fields).
Thread Starter
sands2
(@sands2)
Hi
I use a copy to clipboard Java script that uses a flash player.
You know the kind: “Click the button to copy the text to your Clipboard”.
I just don’t know where to drop the java script and the needed flash player.
I don’t even know here the posts reside! Which directory holds them?
Thank you.
If it’s just a script, switch to the HTML editor and just paste it into your post.
Thread Starter
sands2
(@sands2)
THank you Otto.
And Which Directory Holds the Posts and Pages?
I need to put a Flash PLayer in the same directory as the Java.
They aren’t in any directory. Your post content is held in the database. You’ll need to put the flash code somewhere on the site and then reference it by URL.
Thread Starter
sands2
(@sands2)
Otto,
Where in this Javas Script should I put the html code pointing to the whwr I have the flash player?
<script type=”text/javascript”><!–
function copy(text2copy) {
if (window.clipboardData) {
window.clipboardData.setData(“Text”,text2copy);
} else {
var flashcopier = ‘flashcopier’;
if(!document.getElementById(flashcopier)) {
var divholder = document.createElement(‘div’);
divholder.id = flashcopier;
document.body.appendChild(divholder);
}
document.getElementById(flashcopier).innerHTML = ”;
var divinfo = ‘<span class=”mceItemEmbed” src=”_clipboard.swf” mce_src=”_clipboard.swf” FlashVars=”clipboard=’+escape(text2copy)+'” width=”0″ height=”0″ type=”application/x-shockwave-flash”></span>’;
document.getElementById(flashcopier).innerHTML = divinfo;
}
}
// –></script>
See where it says src="_clipboard.swf" mce_src="_clipboard.swf"? That’s the link to your swf file (which I assume is named _clipboard.swf). You need to make those two the full URL path to your file instead.