cynosure1023 Posted December 15, 2011 Share Posted December 15, 2011 Hi All, I was wondering if copy to clipboard is available for iframe. i tried to search on google and no joy. Could somebody please advise?Thanks in advance. Ok So I am having a website and there was already a copy to clipboard option for which i used Javascript code and that worked perfectly fine but now i have iframe and the copy to clipboard function does not work anymore. I have a html website. I have a web based page(html- frames format) for our text documents articles on various subjects. The page is made in three frames. It's exactly like this "http://www.w3schools.com/html/tryit.asp?filename=tryhtml_frame_mix". The copy to clipboard optionis for the articles displayed in the main menu.The code is: <SPAN ID="copytext" STYLE="height:;width:;background-color:"><p>Please do the following:<br /> 1. Click on Edit > Preferences<br /> 2. Select the Multimedia Trust (legacy) Category on left side of window<br /> 3. Select 'Other Documents' under 'Trust Options' frame<br /> 4. Select 'Permission for Adobe(R) Flash(R) Player is set to Prompt' in<br /> list box<br /> 5. Change value for Change permission for selected multimedia player<br /> to: 'Always'<br /> 6. Click 'OK' </p> <p>Kind Regards,</p></SPAN><TEXTAREA ID="holdtext" STYLE="display:none;"></TEXTAREA><BUTTON onClick="ClipBoard();">Copy to Clipboard</BUTTON> <script LANGUAGE="JavaScript"> function ClipBoard(){holdtext.innerText = copytext.innerText;Copied = holdtext.createTextRange();Copied.execCommand("RemoveFormat");Copied.execCommand("Copy");} </SCRIPT> For iframe i am using this : <iframe src="text.txt" frameborder="0" scrolling="yes" height="400" width="650"> Text file not found.</iframe> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.