Please login or register. Welcome to the Studio, guest!


Quick Links:


newBookmarkLockedFalling

Andrew McGivery

Andrew McGivery Avatar
Formerly Fredy

******
Legendary Studio Member

Male
5,742


September 2005
hey again. i've seen a javascript function somewhere where you click on alink and it copies text to your clipboard.

jsut wodnering how i would do this.

thanks,
fredy

k

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
To the clipboard? That's IE only. This is the code I made for the Affiliates script. ;)


getCode: function(){
var gencode = "<a href='http://"+location.host+"'><img src='"+aff.mbUrl+"' border='0' alt='"+document.title.split(/-/i)[0]+"' title='"+document.title.split(/-/i)[0]+"' /></a>";
try {
var te = document.getElementById("te");
te.value = gencode;
co = te.createTextRange();
co.execCommand("Copy");
alert("The code has been copied to your clip board.");
} catch(e){
prompt("Copy the code below to your clipboard using ctrl+c.",gencode);
}
},


Andrew McGivery

Andrew McGivery Avatar
Formerly Fredy

******
Legendary Studio Member

Male
5,742


September 2005
thanks. this will be something i will have to study and possibly use :P
k

Smangii

Smangii Avatar
Smangii Avatar

****
Senior Member

262


March 2006
LOL What a coincidence, I was looking for something like this too. I figured it only worked in IE =/ Been trying to have SOMETHING work with FF but no solutions...yet.







Chris

Chris Avatar

******
Head Coder

19,519


June 2005
FF doesn't support the property. I don't think there's anyway to alternate that. =/

Smangii

Smangii Avatar
Smangii Avatar

****
Senior Member

262


March 2006
Darn, i wonder if FF will ever come out with a more...supportive...version ::)







hpmad

hpmad Avatar



858


September 2005
smangii said:
Darn, i wonder if FF will ever come out with a more...supportive...version ::)


O_o This is a little off topic but I have to say that Firefox is the best thing that ever happened to the Internet and web browsing.

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
FF's to standards, IE's making stuff up.

If you had an Algebra book teaching you Geometry, would you use it or the book that really taught Algebra? I'd take the Algebra book, aka FF. No the Algebra/Geometry book aka IE. ;)

Moose

Moose Avatar

****
Senior Member

449


August 2005
cddude229 said:
FF's to standards, IE's making stuff up.

If you had an Algebra book teaching you Geometry, would you use it or the book that really taught Algebra? I'd take the Algebra book, aka FF. No the Algebra/Geometry book aka IE. ;)

Algebra and Geometry are boring and pointless. :P
Greg says:
Coding music...
Greg says:
Hmm...
Greg says:
I wouldn't rule it out. :P
Chris 3.0 [New features? Yes.] says:
:P
Greg says:
If you think about machine code it's a bunch of 1s and 0s
Chris 3.0 [New features? Yes.] says:
Anything is possible.
Greg says:
Yeah try to code Metallica
Chris 3.0 [New features? Yes.] says:
:P Yeah, I'll get right on that... right after I learn to fly.

Virtuoso

Virtuoso Avatar

****
Senior Member

271


May 2006
moose said:
cddude229 said:
FF's to standards, IE's making stuff up.

If you had an Algebra book teaching you Geometry, would you use it or the book that really taught Algebra? I'd take the Algebra book, aka FF. No the Algebra/Geometry book aka IE. ;)

Algebra and Geometry are boring and pointless. :P


*falls off a cliff laughing*

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
Stay on topic please guys...

anyway i see this topic is gonna end up going to a fight between IE and FF hogs... lol... keep it clean or i will just lock this topic

Smangii

Smangii Avatar
Smangii Avatar

****
Senior Member

262


March 2006
I'll keep it clean...FF rules and IE sucks, lol JUST KIDDING!!! jk, jk jk :P They're both ok, i guess ^^ Both have good & bad...end of discussion :P

Back to the copytext thing... is there absolutely NO way to copy text in FF without having to right click --> copy? Because I've been able to do it on certain sites, but when I use the code it doesn't work v.v







Chris

Chris Avatar

******
Head Coder

19,519


June 2005
You can't copy something automatically to a clipboard, because FF is made to work on Mac too, therefor the clipboard is different....

Llanilek

Llanilek Avatar
Former Elite Mod

****
Dedicated Studio Member

931


October 2005
isn't there a way of seeing what OP system they are on? and then just using an if statement to switch between the two?

Chris

Chris Avatar

******
Head Coder

19,519


June 2005
Probably, but doesn't matter. FF doesn't support the function anyway.

newBookmarkLockedFalling