[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Problem Replacing the value of a text area using

Subject: RE: Problem Replacing the value of a text area using RegX.
From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
Date: Wed, 25 Aug 2004 10:00:27 +0000
regexp g
HI,
I think you have reached the wrong place for your question.
You must probably put your question to a Javascript List.
Vasu


From: "Mohammed Ashfaq S" <Mohammed.S@xxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject:  Problem Replacing the value of a text area using RegX.
Date: Wed, 25 Aug 2004 12:48:00 +0530

Hi,
I have a problem replacing the modified text in the textarea, every time I do I get an blank space added to the each line of code present in the TextArea.


Has it go to do anything with the regX? or does the textarea behave like this.

Sample code in xsl:

function replaceStringDemo() {
    //Detail demo
	regX = new RegExp("\@@@","g") ;
	document.form1.Detail.value=document.form1.Detail.value.replace(regX,"\n");
	regX = new RegExp('@lt;',"g");
	document.form1.Detail.value.replace(regX,'&lt;');
	regX = new RegExp('@gt;',"g");
	document.form1.Detail.value.replace(regX,'&gt;');

//pager demo
regX = new RegExp("\@@@","g") ;
document.form1.Outline.value=document.form1.Outline.value.replace(regX,"\n");
regX = new RegExp('@lt;',"g");
document.form1.Outline.value.replace(regX,'&lt;');
regX = new RegExp('@gt;',"g");
document.form1.Outline.value.replace(regX,'&gt;');
}




-------------------------------------------------------------
In text Area the text looks something like this..

.blank2 ( each time I replace the changed text in the text area I get an additional blank space added to it)

.insert Info
.insert restofdata

---------------------------------------------


I have checked my code, Looks like it behaving okay except for this..


Your help is highly appreciated.

Thanks
Ashfaq


_________________________________________________________________
Use MSN Messenger to send music and pics to your friends http://www.msn.co.uk/messenger


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.