Title: Does any know how to implement Java Script for a Page or Post
Last modified: August 19, 2016

---

# Does any know how to implement Java Script for a Page or Post

 *  [sands2](https://wordpress.org/support/users/sands2/)
 * (@sands2)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/does-any-know-how-to-implement-java-script-for-a-page-or-post/)
 * Does any know how to implement Java Script for a Page or Post?
 * Or perhaps can point me to a forum that does?
 * I note every Java question goes unanswered here, so perhaps some member is aware
   of a WP forum that could answer this one.
 * Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Hiranthi](https://wordpress.org/support/users/illutic/)
 * (@illutic)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/does-any-know-how-to-implement-java-script-for-a-page-or-post/#post-850810)
 * 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](http://wordpress.org/extend/plugins/more-fields/)).
 *  Thread Starter [sands2](https://wordpress.org/support/users/sands2/)
 * (@sands2)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/does-any-know-how-to-implement-java-script-for-a-page-or-post/#post-850818)
 * 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.
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 8 months ago](https://wordpress.org/support/topic/does-any-know-how-to-implement-java-script-for-a-page-or-post/#post-850823)
 * If it’s just a script, switch to the HTML editor and just paste it into your 
   post.
 *  Thread Starter [sands2](https://wordpress.org/support/users/sands2/)
 * (@sands2)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/does-any-know-how-to-implement-java-script-for-a-page-or-post/#post-850991)
 * 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.
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 8 months ago](https://wordpress.org/support/topic/does-any-know-how-to-implement-java-script-for-a-page-or-post/#post-851069)
 * 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](https://wordpress.org/support/users/sands2/)
 * (@sands2)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/does-any-know-how-to-implement-java-script-for-a-page-or-post/#post-851070)
 * 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>
 *  Moderator [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * (@otto42)
 * WordPress.org Admin
 * [17 years, 8 months ago](https://wordpress.org/support/topic/does-any-know-how-to-implement-java-script-for-a-page-or-post/#post-851071)
 * 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.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Does any know how to implement Java Script for a Page or Post’ is closed
to new replies.

## Tags

 * [java](https://wordpress.org/support/topic-tag/java/)

 * 7 replies
 * 3 participants
 * Last reply from: [Samuel Wood (Otto)](https://wordpress.org/support/users/otto42/)
 * Last activity: [17 years, 8 months ago](https://wordpress.org/support/topic/does-any-know-how-to-implement-java-script-for-a-page-or-post/#post-851071)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
