Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

javascript functions

Status
Not open for further replies.

crystalized

Programmer
Jul 10, 2000
390
CA
Hi all

Is there a javascript function that goes through a string and replaces instances of some substring with another string. I know in VBScript there is the Replace function that does this.

If anyone knows of a function (and especially the syntax for it) or where I can find a function like this I would greatly appreciate the pointer.

Thanks in advance.
 
As it turns out I was able to handle what I needed by altering the stored procedure that was providing the data.

What I did was shave off the first 2 characters of each of the words in the resultset (which are the -- I wanted to replace)

Then since I am using Visual Interdev within the Grid DTC you can format output using javascript. In this case I just had to concatenate the two spaces onto the front of the descriptions in the resultset. It was there in the formating of the resultset that I wanted to use the replace function.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top