<?xml version="1.0" encoding="UTF-8"?>
<test id="wmlscriptlib/url/loadstring/2" class="A" scope="wmlscriptlib" testtype="application" type="auto" source="wmlssl12#10.14" device="both">
  <assertion>When the URL.loadString function is called with the parameters string
URL and string ContentType, where URL is an absolute URL that cannot be
loaded, the function returns an integer error code.
</assertion>
  <results>
    <result>
      <name>test</name>
      <value>pass</value>
    </result>
  </results>
  <method>
    <![CDATA[<card newcontext="true" id="main">
<onevent type="onenterforward">
<go href="<script1>#main('test','card1')"/>
</onevent>
<auto_failed>
</card>]]>
  </method>
  <cards>
    <card id="1">
      <![CDATA[<card id="card1">
<onevent type="onenterforward">
<go href="<resulturl>">
<postfield name="test" value="$test"/>
<postfield name="value" value="$value"/>
<sessionvars>
</go>
</onevent>
<auto_failed>
</card>
]]>
    </card>
  </cards>
  <scripts>
    <script id="1">
      <![CDATA[extern function main(myvar,next) {
	var result = 'fail';
	var value = URL.loadString("<testurl>nofile.txt", "text/plain");

	if (Lang.isInt(value)) {
		result = 'pass';
	}
	WMLBrowser.setVar(myvar, result);
	WMLBrowser.setVar('value', value);
	WMLBrowser.go('#' + next);
	return 1;
}
]]>
    </script>
  </scripts>
</test>

