Simon336697
asked on
PHP
Hi Guys
Hope you can help.
What Id like to do is the following:
-------------------------- ---------- ---------- ---------- ---------- ---------- --- Web Page
========================== ========== = Code Snippet1
Code in here.....
Code in here.....
Code in here.....
Code in here.....
-------------------------- ---------- ---------- ---------- End of code
<Copy Code Button>
========================== ========== = Code Snippet2
Code in here.....
Code in here.....
Code in here.....
Code in here.....
-------------------------- ---------- ---------- ---------- End of code
<Copy Code Button>
========================== ========== = Code Snippet3
Code in here.....
Code in here.....
Code in here.....
Code in here.....
-------------------------- ---------- ---------- ---------- End of code
<Copy Code Button>
========================== ========== ========== = End of web page.
All Im trying to do, is to:
Create a CopyCode Button that:
1) Selects automatically all the code in the text box, to the clipboard
2) Able to have as many CopyCode Buttons on the page as you want, which reference whatever text box the Code is in.
As Im using PHP/HTML, this would be the preferred scripting method.
Thanks guys in advance.
Hope you can help.
What Id like to do is the following:
--------------------------
==========================
Code in here.....
Code in here.....
Code in here.....
Code in here.....
--------------------------
<Copy Code Button>
==========================
Code in here.....
Code in here.....
Code in here.....
Code in here.....
--------------------------
<Copy Code Button>
==========================
Code in here.....
Code in here.....
Code in here.....
Code in here.....
--------------------------
<Copy Code Button>
==========================
All Im trying to do, is to:
Create a CopyCode Button that:
1) Selects automatically all the code in the text box, to the clipboard
2) Able to have as many CopyCode Buttons on the page as you want, which reference whatever text box the Code is in.
As Im using PHP/HTML, this would be the preferred scripting method.
Thanks guys in advance.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Hi Simon,
I use this feature of JAVASCRIPT many years.
You can search the Internet and find the solution, i.e. http://www.htmlgoodies.com/beyond/javascript/article.php/3458851
It may helps :-)
Frank
I use this feature of JAVASCRIPT many years.
You can search the Internet and find the solution, i.e. http://www.htmlgoodies.com/beyond/javascript/article.php/3458851
It may helps :-)
Frank
In firefox 2.0, access to the register is blocked.
ASKER
Mate you are dead right.
Ill post this again in the javascript section.