ODBiC Discussion Board

RE: Passing Values to URL , Girish Patel, 07-11-2006

Try this...

by Roger Harris, July 11, 2006 13:32

SET geo_ids = "";
WHILE $sel$;
    SET geo_ids = $geo_ids$"&-geo_id="$split(sel,",");
That will build up the geo_ids string of name=value pairs, one at a time as they are split from the input string, until there are none left in $sel$. (This will destroy the contents of $sel$, so if you need to keep that, copy it into another variable and split the copy.) The result string will begin with an "&" (because "&-geo_id=" is added to the string each time), and you will probably want to remove that when it's put into the URL, which you can do like this:
(i.e. without a third parameter to specify the number of characters, the $mid( ) function will extract everything from the second character to the end of the string.)


Post Your Reply:

E-mail  optional

HTTP Link: 
Link text: 


Copyright ©1997-2003, Roger Harris. All rights reserved.