- From: nitin gupta <nits77@lycos.com>
- Date: Sun, 14 Oct 2001 08:29:53 +0530
- To: www-mobile@w3.org
hi all , I have got stuck on a problem . I would be highly obliged if you could suggest me a way out. I have a small module which needs array . Since WMLScript supports array , I tried using ":" as my delimiter with the following code :- from the main.wml file I call symnotknown.wmlc#choose where i pass the variable symbollist and complist as intialized below and then try to retrieve the values from the array and set variable before calling symbsknown.wml file where I print those variable . But everytime I try to run this ALL THE RETURN parameters turn out be blank . But in case I intialize symbollist and complist as single values and not array's , then they work well . But I want the array implementation. ----------------------------------------------------------------- FILE -> "main.wml" ----------------------------------------------------------------- <?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card id="search" title="search result"> <onevent type="onenterforward"> <refresh> <setvar name="symbollist" value="40:7"/> <setvar name="complist" value="99:86"/> </refresh> </onevent> <p align="center" mode="wrap"> <br/> <a href="http://157.182.44.222:7001/symnotknown.wmls#choose ($(symbollist:unesc),$(complist:unesc))"> Proceed </a> </p> </card> </wml> ----------------------------------------------------------------- Script FILE -> "symnotknown.wmlc#choose" ----------------------------------------------------------------- extern function choose(symbollist,complist) { var count; var x = 0; var sym = symbollist; var comp = complist; var sym1; var comp1; var finalvar = String.elements(symbollist, ":"); count = Lang.parseInt(finalvar); while (x < count) { sym1 = String.elementAt(symbollist, x , ":"); comp1 = String.elementAt(complist, x , ":"); finalvar = finalvar + sym1 + " " + comp1 + " "; x++; } WMLBrowser.setVar("result1",finalvar); WMLBrowser.setVar("result2",count); WMLBrowser.setVar("result3",sym); WMLBrowser.setVar("result4",comp); WMLBrowser.setVar("result5",sym1); WMLBrowser.setVar("result6",comp1); WMLBrowser.refresh(); WMLBrowser.go("symsknown.wml#choose"); } ----------------------------------------------------------------- FILE -> "symsknown.wml#choose" ----------------------------------------------------------------- <?xml version="1.0"?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card id="choose" title="Select your choice"> <p align="center"> The results obtained are : $result <br/> result1: $result1 <br/> result2: $result2 <br/> result3: $result3 <br/>result4: $result4 <br/> result5: $result5 <br/> result6: $result6 <br/> </p> </card> </wml> --------------------------------------------------------------------- I would be highly obliged if you could suggest me a way out . thanking you , nitin Make a difference, help support the relief efforts in the U.S. http://clubs.lycos.com/live/events/september11.asp
Received on Saturday, 13 October 2001 23:00:36 UTC