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
 
WMLScript Reference WMLScript Reference

WMLScript > URL > loadString()

loadString() - The loadString Function

Usage:  
loadString(url, contentType)
Description:  Returns the content denoted by the given absolute url and the content type.

The given content type is erroneous if it does not follow the following rules:
  • Only one content type can be specified. The whole string must match with only one content type and no extra leading or trailing spaces are allowed.
  • The type must be text but the subtype can be anything. Thus, the type prefix must be "text/".
The behavior of this function is the following:
  • The content with the given content type and url is loaded. The rest of the attributes needed for the content load are specified by the default settings of the user agent.
  • If the load is successful and the returned content type matches the given content type then the content is converted to a string and returned.
  • If the load is unsuccessful or the returned content is of wrong content type then a scheme specific error code is returned.


Example:
var myUrl = "http://www.host.com/vcards/myaddr.vcf";
myCard = URL.loadString(myUrl, "text/x-vcard");




Bookmark this page
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