From Textarea to HTML code

Hello All,

I’m not exactly sure how to frame this question.

I’m building a simple web form with a textarea. In the textarea, French will be entered. Next to difficult French words, the English equivalent will be entered in [brackets].

When this form is submitted, I want to generate an html page where the English equivalents are entered into HTML code for onMouseover=“showtip”.

My textarea:

<textarea>
French word [English equivalent]
</textarea>

For example, my html would look like:

<a href="#" onMouseover="showtip('[COLOR="Red"]English-Equivalent[/COLOR]')";
onMouseout="hidetip()">[COLOR="red"]Difficult-French-Word[/COLOR]</a> 

Is there a way to grab this variable from the textarea like this and insert it into the HTML code? Is this even possible? I’ve made other forms with javascript and php, but have never pulled a variable from the textarea like this.

Thanks in Advance

You could use one of the jQuery tooltips for this. This is a plugin for live preview. Maybe you could do something with it:

jQuery Live Preview