User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the XML, XSLT and XPATH section within the Software Development category of DaniWeb, a massive community of 402,027 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,482 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Views: 1335 | Replies: 0
Reply
Join Date: Apr 2007
Posts: 3
Reputation: ryanokc is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ryanokc ryanokc is offline Offline
Newbie Poster

need some help in WML

  #1  
Apr 7th, 2007
I wish to do the asterisk and reverse the order of the word. so below is my code.... and it not working... pls help..... thx a lot

<wml>
<card id="card1"title="INPUT">
<onevent type="onenterforward">
<go href="reverse.wmls#reverse()"/>
<refresh>
<setvar word="words" value=""/>
</refresh>
</p>
</card>

<card id="card2" title="OUTPUT">
<p>
input the wordresult1
</p>
<p>
The result are $result2 and $result3
</p>
</card>
</wml>


extern function reverse(){
var a;
var b;
var word=Dialogs.prompt("Input the word:","");
var word2="";
var word3="";
var word4=String.charAt(word,0);
for(var i=String.length(word)-1;i>=0;i++){
a=String.charAt(word,i);
word2=word2+a;
}

for(var i2=1;i2<=String.length(word)-1;i2--){
b="*";
word3=word3+b;
}

WMLBrowser.setVar( "result1",word);
WMLBrowser.setVar( "result2",word4+word3);
WMLBrowser.setVar( "result3",word2);
WMLBrowser.go( "#card2" );
}
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb XML, XSLT and XPATH Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the XML, XSLT and XPATH Forum

All times are GMT -4. The time now is 10:22 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC