Full name
David Dow
Submitted by David on Mon, 07/16/2012 - 00:00
Forums

Niels,

I'm looking at a customer requirement which uses some JavaScript and passes parameters via an ajax request on the query string. The sample code with the script is in PHP and uses the explode() function, for example:

List($sub_id, $tbl1, $row1, $col1, $tbl0, $row0, $col0) = explode('_', $p);    

I can write some code to parse the query string but wondered if this can already be done in / added to IceBreak? The JavaScript can also pass the data via JSON but I cannot figure out how to configure this.

Regards,
David

Niels Liisberg

Mon, 07/16/2012 - 00:00

Hi David;

The equivalent code in IceBreak is:

/include iceutility

…

sub_id = word(p,0,'_');
tbl1 = word(p,1,'_');
row1 = word(p,2,'_');
col1 = word(p,3,'_');
tbl0 = word(p,4,'_');
row0 = word(p,5,'_');
col0 = word(p,6,'_');

And if you need the decimal value:

I.e.: 

col0 = num(word(p,6,'_'));

Best regards,
Niels Liisberg