...

View Full Version : generating <size> with a selection



joonstar
11-07-2006, 07:24 AM
<form>

<select name='size'>
<option value='size1'>size1</option>
<option value='size2'>size2</option>
<option value='size3'>size3</option>
<option value='size4'>size4</option>
</select><br>

<textArea name='textArea' style='width:500;height:150'>
target text
</textArea>

</form>I have a selection and textArea like the above.

I like to make it like the following.

(1) A user puts the cursur in fron of target text with his or her mouse.
(2) He or she drags the cursur to the end of target text.
(3) He or she selects size3 using the selection box.

Then,

"target text" becomes "<size3>target text</size3>."

Can I do it with your help?

joonstar
11-07-2006, 09:33 PM
I am thinking why you don't reply to this question.
I guess the following reasons.


(1) You don't understand what I want.


(2) javacript can't do this.


(3) This is too complex.


(4) This is still secret.


Which one would you choose among my guesses above?

VortexCortex
11-07-2006, 11:28 PM
(1) I do understand what you want - eg: the post editor on this site.

(2) Javascript can do this.

(3) This is not too complex.

(4) I have the code in my library.

(5) You're rude.

VortexCortex
11-08-2006, 02:05 AM
I'm not usually this nice to rude people, but here you go:
an example of EXACTLY what you want.

I escaped the code, so if you want the source you'll have to work for it!:p

Select & Replace Example (http://www.vortexcortex.com/select.html)

Enjoy.

joonstar
11-08-2006, 09:17 AM
(5) You're rude.


I like to apologize for my rude as you said.


But I like to know why you think I am rude.

joonstar
11-08-2006, 09:21 AM
I escaped the codel.
I don't understand the sentence above. What does it mean?

joonstar
11-10-2006, 05:15 AM
I'm not usually this nice to rude people, but here you go:
an example of EXACTLY what you want.

I escaped the code, so if you want the source you'll have to work for it!:p

Select & Replace Example (http://www.vortexcortex.com/select.html)

Enjoy.I am stuck in the code of the kind VortexCortex for days.
Can you give me any hint on this issue?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum