Forum Moderators: open

Message Too Old, No Replies

Wrapping text in textarea

         

kenchix1

5:17 am on Jun 17, 2005 (gmt 0)

10+ Year Member



How do I force a text to wrap inside a textarea in such a way that it will wrap a URL? (url doesn't have blank space) It can wrap a text if it has a space but it can't wrap a text if it doesn't have spaces. is it possible to wrap this kind of text?

kenchix1

9:52 am on Jun 17, 2005 (gmt 0)

10+ Year Member



My purpose for this is because I wanted to put a text box where I will put the url of the page together with custom text (from mysql) and when the user click on the textbox, it will automatically select all the content.

I'd like to give a user an option to copy the url that can be used in posting inside a forum.

(like the text box in photobucket where you can copy and paste the [url] tags of the image and paste it inside the forum)

please help.

thanks in advance.

monkeythumpa

4:05 pm on Jun 17, 2005 (gmt 0)

10+ Year Member



It won't wrap. There are three options:

First, you can count the number of characters in the word and force a space into any words that exceed that limit. You can do this in the DB output or in the logic. The type will still be clickable, but the url displayed will be in two pieces. Not good for copy/paste.

Second, you can define any overflow of the block emlement to be hidden. Your url will cut off but still be clickable. OK for copy/paste the text box should scroll.

Third you can redesign the page so the text area is not as restrictive. Best for copy/paste, but might be a bear to redesign.

That is all I can think of off the top of my head.

kenchix1

2:13 am on Jun 18, 2005 (gmt 0)

10+ Year Member



thank you for your ideas. :) it help me think of a way. :)

Because the real URL is too long composed of several parameters being passed to the script this is what I did, I created a subdomain and an index.php file the has a GET query. I then use the a single parameter that will be passed to the real URL then ridirect it. In that way I cut the URL for about 75%. no need for textarea field :D