View Full Version : Copying New Code
dhtmlx
12-24-2002, 12:53 AM
I have a code on my site where the user clicks a button adn words get added to a textarea. Then I want the user to copy that code using the clip board but when I try nothing gets copied:confused: . This is an example of the code:
function add1() {
document.test.head1.value+="Blah Blah Blah";
}
Then i would call that function and I would see the text added but I cant copy it?!? Does any one know what I can do...It is very crucial to my web site.
ez4me2c3d
12-24-2002, 01:32 AM
this worked for me... check it out : http://rap.midco.net/ez4me2c3d/html/copy_text.html
whammy
12-24-2002, 01:37 AM
You can only copy "selected" text in a textarea, or text that's saved to memory (to the clipboard) in IE (Internet Explorer 5+, I think) using proprietary IE code. I do have an example of that if you want it, but it won't work in any other browsers. :)
P.S. Is there a DOM 2 version of this?
dhtmlx
12-24-2002, 01:41 AM
Thank you for your time and answers but it seems as though the problem was right under my nose....THE SCIPPT WAS RIGHT. My D@#$ HTML editor doesnt let you use ctrl C and ctrl V. I hate HTML editors......From now on im justing using notepad!!!:mad:
Thank You For Your Examples And Sorry I wasted Your Time
whammy
12-24-2002, 01:42 AM
Try TextPad - it's like $30 or so (if you want to buy it, as far as I know you can use it fully functional for free with only occasional reminders to buy the program)... but it's awesome if you like coding in a text editor - I gladly paid for my copy! ;)
http://www.textpad.com
krycek
12-24-2002, 01:53 AM
Well it's not often I blag something but...
CRIMSON EDITOR
Go find it!
www.crimsoneditor.com
heheh believe it or not, this little baby tempted me over from Dreamweaver MX! I now edit all my code in Crimson Editor :)
The only downside is that it's free... I paid full whack for Studio MX (but then I get all the other stuff like Fireworks and Flash so I guess it aint all bad lol :))
Go get it! NOW! ...and did I say it's free? :D
::] krycek [::
whammy
12-24-2002, 01:55 AM
I've tried Crimson Editor... it's ok... but actually I prefer TextPad over it any day, personally, and I haven't had a need to use it yet (it's still on my system just in case ;)).
Crimson Editor seems to be pretty full-featured and fairly well thought out though (minus a couple of things that personally annoyed me). I can guarantee you it won't be free a year from now. ;)
For anyone NOT using TextPad, or perhaps for people that are a little more used to WYSIWYG editors, Crimson is "da bomb".
Still... krycek - if you haven't tried TextPad, you need to. It's the cleanest, simplest, and best IDE for anything I've tried... I personally think it blows Crimson Editor away, just because of its simplicity, not to mention you can compile Java, C++, and I wouldn't doubt .NET stuff soon (although they have not implemented this yet, you can still use the command line compilers)... ;)
krycek
12-24-2002, 02:20 AM
heheh, I have tried TextPad, I found it a long time before I found Crimson, and I never really took to it (each to his own) I preferred to stick to Dreamweaver - not because of the WYSIWYG (because that's not exactly great esp. when you are working on PHP etc.) but because of the pretty colors ;) and other features like search and replace (very powerful in DW!) and the references etc.
...but hey, what do you mean about Crimson being WYSIWYG? :confused: It is a pure text editor... nothing WYSIWYG about it as far as I know...?
Oh yeah and also, what things are missing from Crimson, whammy? I can think of a few... it could do with better coloring, for a start, but I am a little fussy and it really is very good. Very pretty colors :D
I just wish I knew a nice-looking font (like verdana sort of thing) that is fixed width like Courier New, which is what I end up using :rolleyes:
::] krycek [::
whammy
12-24-2002, 02:22 AM
I dunno, I use courier new for both... I just like textpad's interface and simplicity better. Not to mention its clip libraries and macros, they are so easy to create and save me from having to type code over and over again with just a couple of mouse clicks - it's so simple to save time using it compared to anything else I've seen, and it uses YOUR code and scripting style, as opposed to Crimson Editor's code, etc...
I could be wrong, I haven't used Crimson Editor that much - although from what I HAVE used it's definitely better than most of the programs out there. That's why it's still on my hard drive. ;)
Skyzyx
12-24-2002, 02:34 AM
Personally, I use Macromedia Homesite 5, as it supports a variety of web languages, has pretty coloring, and lets you choose your font of choice (Verdana 8pt.)! If I'm not using Homesite, I'm using Notepad.
On occasion, I use Dreamweaver MX in hand-coder mode, although it's more for the cool extensions than anything else...
krycek
12-24-2002, 02:40 AM
heheh, well I decided to open up TextPad again to give it another go. I find the interface not quite as easy to code in as Crimson... I like the way that in Crimson you can have your current line a different colour. I also like the way that Crimson can color the background of blocks of PHP. That's nice :)
With TextPad, I notice there isn't very good coloring. Perhaps I need to download some syntax files? What do you normally add to yours? Also, I looked for ages before finding how to adjust the tabs to 8 spaces and the font size to 12... My coding monitor is always set at 1920x1440 so size 12 is a must for my poor eyes! :p
I am not sure about all the extra features of either, because all I want is nice colors :D oh and a few other features. I can keep track of my own code and I am very organised so I am not sure that a code library manager would help me.
I think that maybe I need to learn a bit more about both before REALLY making a decision; I have both side by side now and I definitely like the layour of Crimson better, like the way it has a folder list on the left etc. Also it has an output box which I have never used but there is none on TextPad lol :p
If I could easily customise TextPad to do things like the coloring I mentioned above (current line, PHP blocks etc.) then I would definitely try it out for a bit. But beyond that... I dunno. I don't use all the features of either, all I want is colors and searches etc. :)
::] krycek [::
whammy
12-24-2002, 03:28 AM
Yeah, TextPad doesn't automatically use the proper syntax coloring for whatever file type, you have to assign them, etc. - but that's probably because it's so flexible... however people have created syntax coloring schemes for most languages, downloadable for free, and you can create your own as well... it's more of a "programmer's text editor" than anything else, but it's darn good IMHO (brothercake and a couple of others turned me onto it... i've tried a bunch of alternatives, too, including what was supposedly the best competition, IE UltraEdit, Crimson, EditPad, etc.)... if you are a java or C++ developer you can even compile with it... :D
and the tabs are very customizable... you can use whatever spacing/even spaces instead of tabs or replace spaces WITH tabs using macros if you've done that on accident... :D
The regular expression search in TextPad is rather good from what I've seen (better than EditPad, at any rate, and that had the best I'd tried before)... EditPad actually has a slightly better search and replace feature, UltraEdit from what I've messed with doesn't come close to Crimson Editor, but I haven't messed with UltraEdit much... I actually liked Crimson Editor the more I messed with it, it does have some features that TextPad has, but just a busier interface... for that matter, I was just messing around with CoffeeCup HTML Editor and noticed that it also has some nice scripting features, better than any WYSIWYG I've seen so far (I am prejudiced against dreamweaver though, since I despise the javascript code it creates, among other things).
Anyway, enough about this we should probably continue this in the pit... or at the very least the general web building forum... sorry to pollute the thread like this. :(
dhtmlx
12-24-2002, 07:33 PM
I use 1st Page 200. Mosty for the color coding..Its really great. The other part I use is it has a very good color picker becuase I really dont reel like learning hexadecimal conversions even though i heard it was pretty easy. I never use the built in features like makin tables easy or stuff.
When I dont use 1st page use Edit Pad lite. Its pretty much the same as notepad only you can have more then 1 file open at a time. I use Edit Pad for Java programming.
For when I need to look up soemthing quick I use Front Page 2000. I can put somethign in and learn from the code. I used to use fromtpage but then I learned HTML and it has beenthe best thing that has ever happened to me in my Web Site carreer
^KoalaBear^
12-26-2002, 02:40 AM
LOL.... Ummm... I don't wanna enter this 'cat' fight between you youngsters, but this (world's oldest) newbie still uses a combination of EditPad (Lite or Classic) and Netscape's Composer, although as I've gotten a lil more adventurous, I see the latter has it's definite limitations when using it for non-N/S tricks!
EditPad can be default set to a whole host of both colours and Fonts and has immediate browser view, too.
Ohhhh... and Im also downloading both TextPad 4.5 and Crimson Editor, as I post LOL... to put alongside UltraEdit and a stack of other fully fledged HTML Editors like Dreamweaver's Suite, FrontPage, FirstPage and HomeSite5... which I'm saving to use in my next life and reincarnation of William Gates jr!!!
:D :D :D
krycek
12-26-2002, 02:58 AM
heheh I hope you are not including me as a "youngster" lol :p
Oh yeah and look here:
http://www.codingforums.com/showthread.php?s=&threadid=11926
for the other part of this discussion about editors :)
Merry Christmas Everyone!
::] krycek [::
^KoalaBear^
12-26-2002, 03:12 AM
Originally posted by krycek
heheh I hope you are not including me as a "youngster" lol :p
LOL Yeahhhh right!! What would you call someone born in 1981 if YOU were 60?
:D :D :D
krycek
12-26-2002, 03:15 AM
...you are 60? :eek: point taken! :p
Merry Christmas Everyone!
::] krycek [::
^KoalaBear^
12-26-2002, 03:19 AM
LOL yeah... all the way till November.. then I'm 61!! :D
But... shhhhh... some of our cute lil lady posters think I'm MUCH younger! ROFL ;)
krycek
12-26-2002, 03:28 AM
krycek thinks that maybe ^KoalaBear^ has an ulterior motive in prowling the forums... but as it is Christmas, krycek doesn't care - especially as krycek is married (2 years just gone) and so is not exactly in competition in any case :)
...what "cute lil lady posters" would those be then? ;)
Merry Christmas Everyone!
::] krycek [::
^KoalaBear^
12-26-2002, 03:41 AM
ROFLMAO... right!!
Put ya new wife on and I'll tell her LOL :p
krycek
12-26-2002, 03:58 AM
Originally posted by ^KoalaBear^
ROFLMAO... right!!
Put ya new wife on and I'll tell her LOL :p
"new"...? :rolleyes: there you go again... two years is a long time for me! :p
Merry Christmas Everyone!
::] krycek [::
^KoalaBear^
12-26-2002, 04:00 AM
hehe... you're gonna be lucky to make 30 let alone 60, cobber! :)
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.