xsl-list
[Top] [All Lists]

RE: Problem Replacing the value of a text area using RegX.

2004-08-25 03:00:27
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(_dot_)S(_at_)mphasis(_dot_)com>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: [xsl] 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

--+------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--+--


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



<Prev in Thread] Current Thread [Next in Thread>