Extract text between two strings

September 18, 2009 at 07:19:15
Specs: Windows XP
Hi, I am having below data format. I want to extract data between the <textarea> and </textarea>.

The textarea is not in same or different lines


Any help is greatly appreciated.

See More: Extract text between two strings

Report •

September 18, 2009 at 10:40:39
You can't really do that using html alone, but you can with either server side or client side scripting.

For example, using javascript.

<textarea onmouseover='alert(this.value);'>text area text</textarea>

For what you'd want though, you'd likely want to use "ids" for each textarea and then some sort of trigger.

<body onload='myfunct()'>
<textarea id='1'>.1.</textarea>
<textarea id='2'>.2.</textarea>
<textarea id='3'>.3.</textarea>

<script type='text/javascript'><!--

function myfunct() {

   alert(document.getElementById('1').value +
         document.getElementById('2').value +

Or something like that...


Report •
Related Solutions

Ask Question