RE: Urgent help required

Hi nitin,

You should propably post your message to a forum that discusses WML and
WMLS, try forum.nokia.com or devzone.ericsson.com or the NEWS network.
However I developed WMLS a while ago, and came to the conclusion, that it
often works differently on different browsers. And you might want to try to
access your "setted" variables via $(varname) instead of $varname, it makes
a difference on some browsers.

Regards

Tomas Majak

-----Original Message-----
From: nitin gupta [mailto:nits77@lycos.com]
Sent: den 14 oktober 2001 05:00
To: www-mobile@w3.org
Subject: Urgent help required


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 Monday, 15 October 2001 04:37:17 UTC