Suggestion for the emoticon page (with demo)
-
Hey Chris, I have a suggestion for the emoticons.asp page. How about adding JavaScript to allow IE users to copy the emoticons to their clipboard by clicking on the text or the graphic of the desired emoticon? I saved a copy of the html output of the page and added the code I am talking about. I posted it on my domain so you could see what I mean. Link [new window] Just a thought, I would find it really useful when modifying messages. :)
Jason Jystad
Cito Technologies
Sonork ID: Ogami(100.9918)
An object is simply a referenced thingy.
--Larry Wall (Programming Perl) -
Hey Chris, I have a suggestion for the emoticons.asp page. How about adding JavaScript to allow IE users to copy the emoticons to their clipboard by clicking on the text or the graphic of the desired emoticon? I saved a copy of the html output of the page and added the code I am talking about. I posted it on my domain so you could see what I mean. Link [new window] Just a thought, I would find it really useful when modifying messages. :)
Jason Jystad
Cito Technologies
Sonork ID: Ogami(100.9918)
An object is simply a referenced thingy.
--Larry Wall (Programming Perl)Here is the Javascript function that does the work:
function ClipBoard(TextToCopy) { TextBuffer.innerText = TextToCopy.innerText; CopiedText = TextBuffer.createTextRange(); CopiedText.execCommand("Copy"); }
This has to be in the body somewhere to act as a buffer:
This is what I did to the text of the first emoticon:
<SPAN ID="Emoticon1" onclick="ClipBoard(this);">{smiley text here}</SPAN>
This is what I did to the img tag of the first emoticon:
Jason Jystad
Cito Technologies
Sonork ID: Ogami(100.9918)
An object is simply a referenced thingy.
--Larry Wall (Programming Perl) -
Here is the Javascript function that does the work:
function ClipBoard(TextToCopy) { TextBuffer.innerText = TextToCopy.innerText; CopiedText = TextBuffer.createTextRange(); CopiedText.execCommand("Copy"); }
This has to be in the body somewhere to act as a buffer:
This is what I did to the text of the first emoticon:
<SPAN ID="Emoticon1" onclick="ClipBoard(this);">{smiley text here}</SPAN>
This is what I did to the img tag of the first emoticon:
Jason Jystad
Cito Technologies
Sonork ID: Ogami(100.9918)
An object is simply a referenced thingy.
--Larry Wall (Programming Perl)Nice :-) Nish
Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.
-
Thanks Nish. :) If you liked that, you'll probably love the next bit. :-D (I am posting another suggestion in just a second.) <edit> Actually, I changed my mind. I do have another suggestion, but it is getting late here and I am going to go home and sleep on it. I have it working, but I think I can make it snazzier looking if I am not so tired. So I will post it tomorrow sometime instead. </edit>
Jason Jystad
Cito Technologies
Sonork ID: Ogami(100.9918)
An object is simply a referenced thingy.
--Larry Wall (Programming Perl)good work... Cheers Carlos Antollini. www.wanakostudios.com Sonork ID 100.10529 cantollini
-
Nice :-) Nish
Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.
Thanks Nish. :) If you liked that, you'll probably love the next bit. :-D (I am posting another suggestion in just a second.) <edit> Actually, I changed my mind. I do have another suggestion, but it is getting late here and I am going to go home and sleep on it. I have it working, but I think I can make it snazzier looking if I am not so tired. So I will post it tomorrow sometime instead. </edit>
Jason Jystad
Cito Technologies
Sonork ID: Ogami(100.9918)
An object is simply a referenced thingy.
--Larry Wall (Programming Perl) -
Hey Chris, I have a suggestion for the emoticons.asp page. How about adding JavaScript to allow IE users to copy the emoticons to their clipboard by clicking on the text or the graphic of the desired emoticon? I saved a copy of the html output of the page and added the code I am talking about. I posted it on my domain so you could see what I mean. Link [new window] Just a thought, I would find it really useful when modifying messages. :)
Jason Jystad
Cito Technologies
Sonork ID: Ogami(100.9918)
An object is simply a referenced thingy.
--Larry Wall (Programming Perl)I'll wait and see what suggestion #2 is before I do anything ;) cheers, Chris Maunder
-
I'll wait and see what suggestion #2 is before I do anything ;) cheers, Chris Maunder
Suggestion #2 should (IMHO) be to have them inserted automatically. If you use a window.open() to open up the page of smilies, then just like you have the smilies at the bottom of the reply box inserting their own code, you can use window.opener.document dot blah blah and have the ones in the other window do it. Of course, you probably already know that, but still :P -- David Wengier Sonork ID: 100.14177 - Ch00k
-
Suggestion #2 should (IMHO) be to have them inserted automatically. If you use a window.open() to open up the page of smilies, then just like you have the smilies at the bottom of the reply box inserting their own code, you can use window.opener.document dot blah blah and have the ones in the other window do it. Of course, you probably already know that, but still :P -- David Wengier Sonork ID: 100.14177 - Ch00k
That was what I would have done, but I didn't have the time to figure out how Chris was opening the window. ;p Actually suggestion #1 was just something that occured to me while I was working on suggestion #2. You are absolutely correct, that would definitely be the way to do it David. :)
Jason Jystad
Cito Technologies
Sonork ID: Ogami(100.9918)
An object is simply a referenced thingy.
--Larry Wall (Programming Perl) -
good work... Cheers Carlos Antollini. www.wanakostudios.com Sonork ID 100.10529 cantollini
Thanks Carlos. It is good to get some positive feedback. I so rarely get any at work. ;p Actually David has it right below, the emoticons should really be inserted into the textarea in the parent window.
Jason Jystad
Cito Technologies
Sonork ID: Ogami(100.9918)
An object is simply a referenced thingy.
--Larry Wall (Programming Perl) -
I'll wait and see what suggestion #2 is before I do anything ;) cheers, Chris Maunder
I understand. :) Actually suggestion #2 has very little to do with the emoticons. Suggestion #1 was really just something that occured to me while working on suggestion #2. I do have a #3 that occured to me last night while I was sleeping on suggestion #2. Hmm, this is getting confusing... maybe I should start using code names. :laugh: I talked to nish last night before I went home and he had a couple of ideas about the primary suggestion I am working on. This got me thinking about things and I came up with a couple of additions. I am going to finish nish's suggestions and the new ideas before I post it. I'll get it up sometime today.
Jason Jystad
Cito Technologies
Sonork ID: Ogami(100.9918)
An object is simply a referenced thingy.
--Larry Wall (Programming Perl) -
I'll wait and see what suggestion #2 is before I do anything ;) cheers, Chris Maunder
Ok Chris, I still have one bug to kill and I have some ideas to make it more cross browser compatible so I am going to wait until later on today or maybe this weekend to post the suggestion I am working on. Sorry to string everyone along like this, but I think it will be worth it. :)
Jason Jystad
Cito Technologies
Sonork ID: Ogami(100.9918)
An object is simply a referenced thingy.
--Larry Wall (Programming Perl) -
I understand. :) Actually suggestion #2 has very little to do with the emoticons. Suggestion #1 was really just something that occured to me while working on suggestion #2. I do have a #3 that occured to me last night while I was sleeping on suggestion #2. Hmm, this is getting confusing... maybe I should start using code names. :laugh: I talked to nish last night before I went home and he had a couple of ideas about the primary suggestion I am working on. This got me thinking about things and I came up with a couple of additions. I am going to finish nish's suggestions and the new ideas before I post it. I'll get it up sometime today.
Jason Jystad
Cito Technologies
Sonork ID: Ogami(100.9918)
An object is simply a referenced thingy.
--Larry Wall (Programming Perl)Can I help you with suggestion #5 ? Regardz Colin J Davies
Sonork ID 100.9197:Colin
More about me :-)
-
Can I help you with suggestion #5 ? Regardz Colin J Davies
Sonork ID 100.9197:Colin
More about me :-)
I would be happy to have the help, but Suggestion #5 seems to have slipped into a space/time warp and caused a transporter malfunction. Consequently it seems to have ceased to have ever existed. :laugh: You could make comments on my main suggestion above though! :)
Jason Jystad
Cito Technologies
Sonork ID: Ogami(100.9918)
An object is simply a referenced thingy.
--Larry Wall (Programming Perl)