Click to See Complete Forum and Search --> : Javasrcipt Link for CopyToClipboard
xspeedyalpha21x
07-26-2003, 02:14 PM
The link i have,
<a href=javascript:copytoclipboard(heyheyhey);>Click here</a>
Doesnt work for me.
can someone tell me a LINK, not a code, that will allow you, when you click on it, add heyheyhey to your clipboard?
thanx!
Jupac
07-26-2003, 02:49 PM
you can put your text betwean the span
<script>
function addClip1()
{
holdtext.innerText = copytext1.innerText;
Copied = holdtext.createTextRange();
Copied.execCommand("Copy");
}
</script>
<span id="copytext1" style="display:none;">
<A HREF="http://www.geocities.com/jt490250"><IMG SRC="http://www.angelfire.com/la3/jt490250/jlz1.gif" width="88" height="31" border="1" ALT="John's Lakers Zone" target="_blank"></A>
</span>
<textarea id="holdtext" style="display:none;"></textarea>
<a href="javascript:void(0)" onClick="addClip1()">Add to Clipboard</a>
Jupac
07-26-2003, 02:57 PM
<script>
function addClip1()
{
holdtext.innerText = copytext1.innerText;
Copied = holdtext.createTextRange();
Copied.execCommand("Copy");
}
</script>
<span id="copytext1" style="display:none;">
<beteewwn-here>
</span>
<textarea id="holdtext" style="display:none;"></textarea>
<a href="javascript:void(0)" onClick="addClip1()">Add to Clipboard</a>
kdcgrohl
07-26-2003, 02:58 PM
anything inside here will be copied
<span id="copytext1" style="display:none;">
blah text to copy blah
</span>
xspeedyalpha21x
07-26-2003, 03:01 PM
neither of them work!
Does any1 know a code that works for FreeWebs???
i heard
javascript:copytoclipboard();
but that doesnt work....
i know that javascript:history.back(1) works, i tried it.
O yea, and if no1 knows how to do that, can someone tell me how the website below made it so what when you click on the picture, text comes up to the textbox at the top of the page?
http://www.originalicons.com/?oi=cooltrickshow.php?trick=42
thanx
Jupac
07-26-2003, 03:25 PM
I dose work
script>
function addClip1()
{
holdtext.innerText = copytext1.innerText;
Copied = holdtext.createTextRange();
Copied.execCommand("Copy");
}
</script>
<span id="copytext1" style="display:none;">
Put text here</span>
<textarea id="holdtext" style="display:none;"></textarea>
This is your link
<a href="javascript:void(0)" onClick="addClip1()">Add to Clipboard</a>
Jupac
07-26-2003, 03:59 PM
This script will answer ? #2 k!
<html>
<head>
<script>
function ClipBoard() {
Copied = document.form1.box1.createTextRange();
Copied.execCommand("Copy");
}
var ss =("texthere")
var ss1 =("texthere1")
var ss2 =("texthere2")
var cc =("")
</script>
</head>
<body>
<table>
<tr bgcolor=#000000>
<font size=2 color=#cc0000>Please select one</font>
<form name="form1">
<textarea name="box1" style=" font-size: 12px; color: red; background-color: #000000;"></textarea>
<div><a href="#" onclick="document.form1.box1.value=ss">Select1</a></div>
<div><a href="#" onclick="document.form1.box1.value=ss1">Select2</a></div>
<div><a href="#" onclick="document.form1.box1.value=ss2">Select3</a></div>
<div><a href="#" onclick="document.form1.box1.value=cc">Clear</a></div>
<div><a href="javascript:void(0)" onClick="ClipBoard()">Add to Clipboard</a></div>
</form>
</tr>
</table>
</body>
</html>
:'):')lots and lots of :')
xspeedyalpha21x
07-26-2003, 09:33 PM
That last one is the one i need, but it doesnt work.....
Check my site
www.freewebs.com/imsecrets/typingsecrets
you can see there are two at the bottom, the top one is the one unedited, the bottom one is edited without the spaces and the "s, it seems in the link, you can have spaces or "s!
Please help!
Jupac
07-26-2003, 09:49 PM
when i clicked on the link there was a 404 erorr can u plz check the url
Jupac
07-26-2003, 10:20 PM
The first problem i saw is you dont need
http://members4.freewebs.com/MembersB/createParagraph.jsp?token=a1c2274e2381f5c6f4d66eaa17&pageID=2846120
this in fornt of #
the second problem is
<A href='javascript:void(0)onClick="ClipBoard()"'>Add to Clipboard</A>
you need a space after (0)
it should be like this
<A href='javascript:void(0) onClick="ClipBoard()"'>Add to Clipboard</A>
and wat happen to this
<script>
function ClipBoard() {
Copied = document.form1.box1.createTextRange();
Copied.execCommand("Copy");
}
var ss =("texthere")
var ss1 =("texthere1")
var ss2 =("texthere2")
var cc =("")
</script>
if you are still having problems fee free to teel me
xspeedyalpha21x
07-27-2003, 08:00 AM
i have some more problems.
I still cant copy it, it says Error on Page!
And for the URL thing beofre the #, it puts it there automatically!
Check for yourself. This is what i changed=\
<A href='java script:void(0) onClick="ClipBoard()"'>Add to Clipboard</A>
<div><a href='# onclick="document.form1.box1.value=ss"'>Select1</a></div>
<div><a href='# onclick="document.form1.box1.value=ss1"'>Select2</a></div>
<div><a href='# onclick="document.form1.box1.value=ss2"'>Select3</a></div>
<div><a href='# onclick="document.form1.box1.value=cc"'>Clear</a></div>
Jupac
07-27-2003, 05:29 PM
yu did this wrong
<div><a href='# onclick="document.form1.box1.value=ss"'>All</a></div>
it is suppose to be like this
<div><a href="#" onclick="document.form1.box1.value=ss">Select1</a></div>
add did you add the function?
Jupac
07-27-2003, 05:35 PM
on your web site you did this it wont work
<DIV><A onclick=document.form1.box1.value=ss href='"#" onclick="document.form1.box1.value=ss"'>Select1</A></DIV>
href must be first after a
Jupac
07-27-2003, 05:37 PM
This is also wrong
<A href='java script:void(0) onClick="ClipBoard()"'>Add to Clipboard</A>
is is suppos to be
<A href="java script:void(0)" onclick="ClipBoard()">Add to Clipboard</A>
xspeedyalpha21x
07-28-2003, 01:58 PM
<div><a href="#" onclick="document.form1.box1.value=ss">Select1</a></div>
AND
<A href="java script:void(0)" onclick="ClipBoard()">Add to Clipboard</A>
wont work because there are more than 2 quotation marks, and it will only copy what is in between the first two quotation marks.
Jupac
07-28-2003, 04:38 PM
It work on my site
Jupac
07-28-2003, 04:54 PM
<div><a href="#" onclick="document.form1.box1.value=ss">Select1</a></div>
AND
<A href="java script:void(0)" onclick="ClipBoard()">Add to Clipboard</A>
wont work because there are more than 2 quotation marks, and it will only copy what is in between the first two quotation marks.
?? wat do u mean
<script>
function ClipBoard() {
Copied = document.form1.box1.createTextRange();
Copied.execCommand("Copy");
}
var ss =("texthere")
var ss1 =("texthere1")
var ss2 =("texthere2")
var cc =("")
</script>
Function ClipBoard() will make any thing in the textarea go to the cilpboard
and var s,ss1,ss2 is your text when you cick on it
and cc is clear
and if you do this <a onclick="document.fojfo.what.eevey" href="#">oso</a> wont work
xspeedyalpha21x
07-28-2003, 06:37 PM
what site do you have?
And is it free? I might use it :-)
In FreeWebs, in an <a href> thing, it uses what is in the first two quotation marks, the other things in the link would not count!
Jupac
07-28-2003, 07:28 PM
i use geocities.com it has a good site builder for beginers which ur not
and angelfire.com
and i use tripod.com which has cgi-bin
Jupac
07-28-2003, 07:29 PM
all free forgot to say :')
xspeedyalpha21x
07-28-2003, 09:28 PM
The box thing doesnt work for tripod either?!?
I dunt know why!
I want it to have each smiley, you click on the name, and it apepars in the box. But when you click on the link, instaed of adding the smiley code to the box, it goes to a website!
Ahh
Im going crazy!
Please help me
Attach the exact code you are using.
Jupac
07-28-2003, 09:52 PM
do u mean some thing like this
<html>
<head>
<script>
function ClipBoard() {
Copied = document.form1.box1.createTextRange();
Copied.execCommand("Copy");
}
var a=("smiley1 <img></img>")
var b=("smiley2 <img></img>")
var c=("smiley3 <img></img>")
var d=("smiley4 <img></img>")
var e=("smiley5 <img></img>")
var f=("smiley6 <img></img>")
var cc=("")
</script>
</head>
<body>
<table>
<tr bgcolor=#000000>
<font size=2 color=#cc0000>Please select one</font>
<form name="form1">
<textarea name="box1" style=" font-size: 12px; color: red; background-color: #000000;"></textarea>
<div><a href="#"><img src=http://you.host/smiley1.gif onclick="document.form1.box1.value=a"></img></a></div>
<div><a href="#"><img src=http://you.host/smiley2.gif onclick="document.form1.box1.value=b"></img></a></div>
<div><a href="#"><img src=http://you.host/smiley3.gif onclick="document.form1.box1.value=c"></img></a></div>
<div><a href="#"><img src=http://you.host/smiley4.gif onclick="document.form1.box1.value=d"></img></a></div>
<div><a href="#"><img src=http://you.host/smiley5.gif onclick="document.form1.box1.value=e"></img></a></div>
<div><a href="#"><img src=http://you.host/smiley6.gif onclick="document.form1.box1.value=f"></img></a></div>
<div><a href="#" onclick="document.form1.box1.value=cc">Clear</a></div>
<div><a href="javascript:void(0)" onClick="ClipBoard()">Add to Clipboard</a></div>
</form>
</tr>
</table>
</body>
</html>
Jupac
07-28-2003, 10:51 PM
can u tell me ur url for tripod
Jupac
07-29-2003, 04:39 PM
dose it work??
can u tell me if it works
xspeedyalpha21x
07-29-2003, 06:25 PM
this is the code i tried to do for 3 smileys, and it didnt work. I did links, not pictures.
<html>
<head>
<script>
function ClipBoard() {
Copied = document.form1.box1.createTextRange();
Copied.execCommand("Copy");
}
var 1 =("<font sml="AgHSJmU=">:)</font>")
var 2 =("<font sml="AgHSH1A=">:)</font>")
var 3 =("<font sml="AgHSQ+4=">:)</font>")
var cc =("")
</script>
</head>
<body>
<table>
<tr bgcolor=#000000>
<font size=2 color=#cc0000>Please select one</font>
<form name="form1">
<textarea name="box1" style=" font-size: 12px; color: red; background-color: #000000;"></textarea>
<div><a href="#" onclick="document.form1.box1.value=1>4th of July</a></div>
<div><a href="#" onclick="document.form1.box1.value=2>Action Heros</a></div>
<div><a href="#" onclick="document.form1.box1.value=3>Aging Hippie</a></div>
<div><a href="#" onclick="document.form1.box1.value=cc">Clear</a></div>
<div><a href="javascript:void(0)" onClick="ClipBoard()">Add to Clipboard</a></div>
</form>
</tr>
</table>
</body>
</html>
i want to DO all of the smileys from http://www.bigblueball.com/im/aim/smileys.asp
but if i cant even do 3 smileys, how can do the 100+ on the webpage?
Jupac
07-29-2003, 08:04 PM
you cant put "" in the thing
<html>
<head>
<script>
function ClipBoard() {
Copied = document.form1.box1.createTextRange();
Copied.execCommand("Copy");
}
var a=("<font sml=AgHSJmU=></font>")
var b=("<font sml=AgHSH1A=></font>")
var c=("<font sml=AgHSQ+4=></font>")
var cc=("")
</script>
</head>
<body>
<table>
<tr bgcolor=#000000>
<font size=2 color=#cc0000>Please select one</font>
<form name="form1">
<textarea name="box1" style=" font-size: 12px; color: red; background-color: #000000;"></textarea>
<div><a href="#" onclick="document.form1.box1.value=a">4th of July</a></div>
<div><a href="#" onclick="document.form1.box1.value=b">Action Heros</a></div>
<div><a href="#" onclick="document.form1.box1.value=c">Aging Hippie</a></div>
<div><a href="#" onclick="document.form1.box1.value=cc">Clear</a></div>
<div><a href="javascript:void(0)" onClick="ClipBoard()">Add to Clipboard</a></div>
</form>
</tr>
</table>
</body>
</html>
Jupac
07-29-2003, 10:13 PM
here is the attachment
xspeedyalpha21x
07-30-2003, 09:02 AM
sorry if im annoying you, but i think that one on
http://www.runabot.com/smile.html
will be good for me?
And can you do it with a link? not a picture? cuz thats what i want!
Jupac
07-30-2003, 07:35 PM
Here is the .html file
Jupac
07-30-2003, 07:36 PM
Here is the file
xspeedyalpha21x
07-30-2003, 08:41 PM
here is what i tried.... i attached it
and it didnt work
i dunno why...
xspeedyalpha21x
07-31-2003, 09:35 AM
i updated it, i found something that did work, chagned it, but now it still doesnt work....
Jupac
07-31-2003, 08:07 PM
qdd
xspeedyalpha21x
08-01-2003, 06:35 PM
Ok, i got my website, go to http://imsecrets.tripod.com
i used what i learned here on the site
Thanx every1
below is the banner for my webpage for you to see!