Proceed to WirelessDevNet Home Page
Publications, e-books, and more! Community Tutorials Store Downloads, tools, & Freebies! IT Career Center News Home
newnav.gif

Newsletters
EMail Address:



   Content
  - Articles
  - Columns
  - Training
  - Library
  - Glossary
 
   Career Center
  - Career Center Home
  - View Jobs
  - Post A Job
  - Resumes/CVs
  - Resource Center
 
   Marketplace
  - Marketplace Home
  - Software Products
  - Wireless Market Data
  - Technical Books
 
   News
  - Daily News
  - Submit News
  - Events Calendar
  - Unsubscribe
  - Delivery Options
 
   Community
  - Discussion Boards
  - Mailing List
  - Mailing List Archives
 
   About Us
  - About WirelessDevNet
  - Wireless Source Disks
  - Partners
  - About MindSites Group
  - Advertising Information
 
Wireless Developer Network Mailing List
 
Mailing List Archives

Subject: Re: MobileLBSList: help on WMLScript
Date:  08/21/2000 08:19:51 AM
From:  Marc H. Robards

One way to do validation is this:

in your WML file (example.wml):

<card id="example" title="example">
<do type="accept" label="ok">
<go href="validate.wmls#validateField($(exa))"/>
</do>
<input type="text" name="exa"/>
</card>

<card id="error" title="Error:">
Error: $(error)<br/>
</card>

<card id="results" title="Results:">
Exa: $(exa)
</card>

Make a separate WMLScript file (validate.wmls):

extern function validateField(data) {
if ([validation fails]) {
WMLBrowser.setVar("error", "This field failed validation."):
WMLBrowser.go("example.wml#error"):
}
else {
WMLBrowser.go("example.wml#results"):
}
}

Hope this helps!

Marc Robards
Developer
Wireless Developer Network
marc@wirelessdevnet.com
www.wirelessdevnet.com


Pranav Bansal wrote:
>
> Hi all,
> I want some help from you on the WMLScript. Is it possible with
> WMLScript to validate the data like we do with JAVAscript?
> Here I am giving a small example to explain my Problem.
>
> As we do with JAVAScript
>
> <form action="example.jsp" onsubmit="return functionname(this):">
> <input type="text" name="exa" value="">
> <input type="submit" name="ok">
> </form>
>
> Now when we hit the "ok" button control'll first check the value of text box
> using JAVAScript function and then move to "example.jsp" if return's true.
>
> Now my question is that is it also possible with WML/WMLScript?
> Thanks in Advance.
> With Regards,
>
> Pranav Kumar
> Software Engineer
> Informica India Pvt. ltd.
> Noida,India
> Phone: -91-118-4514702
> www.informica.com
>
> To unsubscribe, write to mobilelbslist-unsubscribe@geocomm.com
> ________________________________________________________________________
> The MobileLBSList is brought to you by The GeoCommunity and The WirelessDeveloperNetwork
> http://www.geocomm.com
> http://www.wirelessdevnet.com


To unsubscribe, write to mobilelbslist-unsubscribe@geocomm.com
________________________________________________________________________
The MobileLBSList is brought to you by The GeoCommunity and The WirelessDeveloperNetwork
http://www.geocomm.com
http://www.wirelessdevnet.com


Sponsors

Search

Eliminate irrelevant hits with our industry-specific search engine!









Wireless Developer Network - A MindSites Group Trade Community
Copyright© 2000-2010 MindSites Group / Privacy Policy
Send Comments to:
feedback@wirelessdevnet.com