Javascript: Split command?

~J~

~J~

Soldato
Joined
20 Oct 2003
Posts
7,558
Location
London
Anyone know if there's a JavaScript equivalent of the VB Split command?

Or, can anyone think of another way of this:

I've a string in a textbox, for example:

243=Paid,75=Dispute,230=Paid,204=Cancel,226=ADE,181=J32,

What I want to do is do a search and replace so that I could say 243 is now Cancel and not paid.

My original thinking was to Split the string at the comma, and then replace everything after the '=' with the new value, then rebuild the string, but I can't see anyway of doing this in JavaScript.

Is there an equivalent command or a better method?
 
Oh hell. Seriously I've searched for "JavaScript Split VB Equivalent" and all sorts on Google and not even seen that!!

Cheers sic.
 
Back
Top Bottom