3.0.0

Change comma to tilda (or ?) on conversion in toString

I noticed that toString uses a comma as field delimiter. Can I change the comma to some other char or maybe 2 chars?

Reason, I have a text field that could have several comma's, so the toString stops parsing a text field at the first comma in the text.

The current code is:
var myString = gridData[index].toString()
...
var myArray = myString.split(",")

If toString would delimit with something like ~ I could use:
var myArray = myString.split(",")

Or, ... is there a better way to retrieve each col of gridData[index]

Thanks
Norm
February 25,
I fixed the problem by addressing to the columns for 'message' and 'response' that are displayed in textareas with the content corresponding to the currently selected row (ie. index)
note: only indexes 0 thru 5 are shown in the grid

// send to citizen message textarea
document.form_2.p_message.value = gridData[index][6]
// send to response textarea
document.form_2.p_response.value = gridData[index][7]

gridData was populated after a resultSet.getRows after a SELECT from a DB.

thank me me.
Norm
February 25,
I have the same problem.

How to change the comma as field delimiter, the loaded tabbed text file is full of comma's so really want to change this to something like #.

Thanks in advance.






JUMP
July 29,
Maby you can use %2C in stead of , and do a .replace (regExp)
John Ophof
July 29,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.