<?xml version="1.0" encoding="UTF-8"?>
<test id="wmlscriptlib/wmlbrowser/setvar/3" class="A" scope="wmlscriptlib" testtype="application" type="auto" source="wmlssl12#11.2" device="both">
  <assertion>When the WMLBrowser.setVar function is called with the parameters string
Name and string Value, and the value of Name does not conform to the
definition of variable names in the WML 1.1 specification, the function
returns 'invalid'.
</assertion>
  <results>
    <result>
      <name>test</name>
      <value>pass</value>
    </result>
  </results>
  <method>
    <![CDATA[<card newcontext="true" id="main">
<onevent type="onenterforward">
<go sendreferer="true" href="<script1>#main('test','card1')">
<setvar name="testvar" value="myvalue"/>
</go>
</onevent>
<auto_failed>
</card>]]>
  </method>
  <cards>
    <card id="1">
      <![CDATA[<card id="card1">
<onevent type="onenterforward">
<go href="<resulturl>">
<postfield name="test" value="$test"/>
<sessionvars>
</go>
</onevent>
<auto_failed>
</card>
]]>
    </card>
  </cards>
  <scripts>
    <script id="1">
      <![CDATA[extern function main(myvar,next) {
	var result = 'fail';
	var value = WMLBrowser.setVar('myvar', invalid);

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

