Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

:help: Copy to Clipboard Code :help:

putingsumblero

Novice
Advanced Member
Messages
48
Reaction score
0
Points
26
:help: po mga ka SB! may form ako consists of textbox,radio button,drop down box at text area. yung gusto ko po malaman paano yung coding nya nakapag pinindot yung copy to clipboard na button ay maka-copy lahat ng text kasama na yung label nito sa clipboard. then pwede na i paste sa word or notepad. Halimbawa: Name: John Doe tapos pag click ng button pwede mo na i paste yung Name: John Doe. Thanks po!
 
Saan ka mag-cocopy? Eh hindi mo nga sinabi kung anong pl na gagamitin mo eh.

EDIT: If HTML, then try this code:


Code:
<SPAN ID="copytext" STYLE="height:150;width:162;background-color:pink">
This text will be copied onto the clipboard when you click the button below. Try it!
</SPAN>

<TEXTAREA ID="holdtext" STYLE="display:none;">
</TEXTAREA>
<BUTTON onClick="ClipBoard();">Copy to Clipboard</BUTTON>

That is just one code. Meron pa yang javascript. Look at the following link:
http://www.htmlgoodies.com/beyond/javascript/article.php/3458851

PROBLEM: Only works in IE (doesn't support IE 11) and it is not compatible to any browsers besides IE.
 
Last edited:
Saan ka mag-cocopy? Eh hindi mo nga sinabi kung anong pl na gagamitin mo eh.

EDIT: If HTML, then try this code:


Code:
<SPAN ID="copytext" STYLE="height:150;width:162;background-color:pink">
This text will be copied onto the clipboard when you click the button below. Try it!
</SPAN>

<TEXTAREA ID="holdtext" STYLE="display:none;">
</TEXTAREA>
<BUTTON onClick="ClipBoard();">Copy to Clipboard</BUTTON>

That is just one code. Meron pa yang javascript. Look at the following link:
http://www.htmlgoodies.com/beyond/javascript/article.php/3458851

PROBLEM: Only works in IE (doesn't support IE 11) and it is not compatible to any browsers besides IE.

newbie lang po. he he he... Thanks sa reply Sir! Html PL ko. nakita ko na yan kanina sa google. kaso di working pag nilagay ko sa loob ng <form> ......</form> saka combination ng dropdown button,radio button at text yung form. saan kaya ako nag ka mali at anu ba dapat code na gamitin ko? Thanks!

Code:
 <SCRIPT LANGUAGE="JavaScript">

function ClipBoard() 
{
holdtext.innerText = copytext.innerText;
Copied = holdtext.createTextRange();
Copied.execCommand("Copy");
}

</SCRIPT>

<form>
<SPAN ID="copytext" STYLE="height:150;width:162;background-color:green">
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure 
dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
</SPAN>
<TEXTAREA ID="holdtext" STYLE="display:none;">
</TEXTAREA>
<BUTTON onClick="ClipBoard();">Copy to Clipboard</BUTTON>
</form>
 
Last edited:
Back
Top Bottom