•
•
•
•
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
![]() |
•
•
Join Date: Apr 2007
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
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 word
result1
</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" );
}
<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 word
result1</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" );
}
![]() |
•
•
•
•
•
•
•
•
DaniWeb XML, XSLT and XPATH Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- learning php (PHP)
- what to use to create mobile phone menu?? (Computer Science and Software Design)
- WML and Mysql (RSS, Web Services and SOAP)
- Database Connectivity in WML pages (ASP)
- What is the best language to use to use to create a menu for mobile phone???? (Computer Science and Software Design)
- WML and connection to Acess and JSP/tomcat (Computer Science and Software Design)
- how well is apache in handling wireless application? (Linux Servers and Apache)
- PDA Software development (Computer Science and Software Design)
Other Threads in the XML, XSLT and XPATH Forum
- Previous Thread: how to send mails directly ?????
- Next Thread: XForms Select1 itemset model instance


Linear Mode