Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

JavaScript Replace ...

2 posts in General Discussion Last posting was on 2007-04-12 14:05:40.0Z
Jan Posted on 2007-04-11 15:02:30.0Z
Reply-To: "Jan" <jan@cyberprop.com>
From: "Jan" <jan@cyberprop.com>
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: JavaScript Replace ...
Lines: 22
Organization: USP Designs
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3028
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3028
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: dsl-243-84-175.telkomadsl.co.za
X-Original-NNTP-Posting-Host: dsl-243-84-175.telkomadsl.co.za
Message-ID: <461cea76@forums-1-dub>
Date: 11 Apr 2007 07:02:30 -0800
X-Trace: forums-1-dub 1176300150 41.243.84.175 (11 Apr 2007 07:02:30 -0800)
X-Original-Trace: 11 Apr 2007 07:02:30 -0800, dsl-243-84-175.telkomadsl.co.za
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:1063
Article PK: 9220

Hi All,

I actually started this (wild goose chase) by looking at using the
.innerHTML to display an HTML string inside a table... I eventually gave up
on this and now I'm trying to remove all the HTML tags from the string and
display the result in the table...

Here's the code I'm using now :
cstring = cstring.replace('<b>','');

Problem is that it's not replacing the <b> globally... and aparently you can
use a regular expression to do this - but I'm not finding anything on the
internet to show me how to do this in M-Business client.

I'm using 5.7 build 32.

Any help will be appreciated.

Thanks!
Jan


David Fishburn Posted on 2007-04-12 14:05:40.0Z
Newsgroups: ianywhere.public.mbusinessanywhere.general
Subject: Re: JavaScript Replace ...
From: David Fishburn <fishburn_spam@off.ianywhere.com>
References: <461cea76@forums-1-dub>
Organization: iAnywhere Solutions
Message-ID: <Xns99105C75DA53Dfishburnsybasecom@127.0.0.1>
User-Agent: Xnews/2005.10.18 Hamster/2.1.0.0
NNTP-Posting-Host: 10.25.18.129
X-Original-NNTP-Posting-Host: 10.25.18.129
Date: 12 Apr 2007 06:05:40 -0800
X-Trace: forums-1-dub 1176383140 10.25.18.129 (12 Apr 2007 06:05:40 -0800)
X-Original-Trace: 12 Apr 2007 06:05:40 -0800, 10.25.18.129
Lines: 51
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.mbusinessanywhere.general:1064
Article PK: 9219

"Jan" <jan@cyberprop.com> wrote in news:461cea76@forums-1-dub of
ianywhere.public.mbusinessanywhere.general:

J> I actually started this (wild goose chase) by looking at using the
J> .innerHTML to display an HTML string inside a table... I eventually
J> gave up on this and now I'm trying to remove all the HTML tags from
J> the string and display the result in the table...
J>
J> Here's the code I'm using now :
J> cstring = cstring.replace('<b>','');
J>
J> Problem is that it's not replacing the <b> globally... and aparently
J> you can use a regular expression to do this - but I'm not finding
J> anything on the internet to show me how to do this in M-Business
J> client.
J>
J> I'm using 5.7 build 32.

Did you try a page like this:

<script type="text/javascript">
var visitorName = "Chuck";
var myOldString = "Hello username! I hope you enjoy your stay
username.";
var myNewString = myOldString.replace(/username/g, visitorName);

document.write("Old string = " + myOldString);
document.write("<br />New string = " + myNewString);
</script>

--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/

Developer Community / Whitepapers
http://www.ianywhere.com/developer

CaseXpress - to report bugs
http://casexpress.sybase.com

CodeXchange - Free samples
http://ianywhere.codexchange.sybase.com/servlets/ProjectDocumentList