Closed Thread Icon

Topic awaiting preservation: if anyone would know, it'd be you guys... (Page 1 of 1) Pages that link to <a href="http://ozoneasylum.com/backlink?for=7972" title="Pages that link to Topic awaiting preservation: if anyone would know, it&amp;#039;d be you guys... (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: if anyone would know, it&#039;d be you guys... <span class="small">(Page 1 of 1)</span>\

 
Amaruuk
Nervous Wreck (II) Inmate

From: Binghamton, NY, USA
Insane since: Jul 2001

posted posted 12-07-2001 15:47

I hope this makes sense coming out, it's early, I'm only on my first coffee of the day. Regardless, here goes.

I was curious if any of you knew a place that explains how to code a button to insert text into a text box. For example.
Say I have a text box in which the user inserts their info. Instead of expecting them to know html (line breaks, bold, what-not, simple stuff), I want to put a button below the text box that, when hit, will enter said html into their text.

If anyone knows of a place I could visit to learn to do this...I know its possible, I have an inkling of how to accomplish it, but before I go messing with the sql, I'd like a better idea. Any help would be incredibly appreciated, guys.

* looks around for any more black pills, and finds herself lacking *
uh oh. no pills. hmm. what can i offer....what can..i ....offer....
*looks around her cell and spots, in the corner, her stash of special brownies*

Amaruuk
Giver of happy food

CPrompt
Maniac (V) Inmate

From: there...no..there.....
Insane since: May 2001

posted posted 12-07-2001 17:11

I don't know if I can do it, but I may have an example for you. Just let me get one thing cleared up:

You have a text box and a button. What would the person type into the text box that would be changed into HTML?

now go get some more coffee~

C:\

Emperor
Maniac (V) Mad Scientist with Finglongers

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 12-07-2001 17:52

Amaruuk: That made perfect sense to me (I think) you may need a little bit of server side scripting to properly process the input from the textarea (like PHP's nl2br and you'd need to make sure noone was submitting scripting that would cause all sorts of problems) but, if I understood your problem, this should do what you want:
http://webfx.eae.net/dhtml/richedit/richedit.html

WebFX are always worth checking out for things like this.

I don't think its very crossbrowser so you'd need to explain this to your users. It is also expanable as I've got it working with super and subscript.

The implementation is pretty easy.

Emps


You're my wife now Dave

« BackwardsOnwards »

Show Forum Drop Down Menu