[Webtest] Javascript usage

Sipe, Andrew webtest@lists.canoo.com
Wed, 23 Apr 2003 17:31:45 -0400


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C309DF.BD24FA20
Content-Type: text/plain;
	charset="iso-8859-1"

I have a question regarding the javascript support of web test.  We have a
javascript method that posts a form based on the user selecting an item from
a drop down list.  The web test script sets the selected item via the
setselectfield task.  But this doesn't seem to trigger the javascript like
it does in a browser.

Is this something that webtest does not yet support? 

Thanks, 

Andy 

The html code (generated by VS.net) looks like: 
.... 
<script language="javascript"> 
<!-- 
 function __doPostBack(eventTarget, eventArgument) { 
  var theform = document.blahform; 
  theform.__EVENTTARGET.value = eventTarget; 
  theform.__EVENTARGUMENT.value = eventArgument; 
  theform.submit(); 
 } 
// --> 
</script> 

... 

      <select name="blah" id="blah" onchange="__doPostBack('blah','')"
language="javascript" > 


------_=_NextPart_001_01C309DF.BD24FA20
Content-Type: text/html;
	charset="iso-8859-1"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Javascript usage</TITLE>

<META content="MSHTML 6.00.2800.1126" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT size=2>I have a question regarding the javascript support of web 
test.&nbsp; We have a javascript method that posts a form based on the user 
selecting an item from a drop down list.&nbsp; The web test script sets the 
selected item via the setselectfield task.&nbsp; But this doesn't seem to 
trigger the javascript like it does in a browser.</FONT></DIV>
<P><FONT size=2>Is this something that webtest does not yet support?</FONT> </P>
<P><FONT size=2>Thanks,</FONT> </P>
<P><FONT size=2>Andy</FONT> </P>
<P><FONT size=2>The html code (generated by VS.net) looks like:</FONT> <BR><FONT 
size=2>....</FONT> <BR><FONT size=2>&lt;script language="javascript"&gt;</FONT> 
<BR><FONT size=2>&lt;!--</FONT> <BR><FONT size=2>&nbsp;function 
__doPostBack(eventTarget, eventArgument) {</FONT> <BR><FONT size=2>&nbsp; var 
theform = document.blahform;</FONT> <BR><FONT size=2>&nbsp; 
theform.__EVENTTARGET.value = eventTarget;</FONT> <BR><FONT size=2>&nbsp; 
theform.__EVENTARGUMENT.value = eventArgument;</FONT> <BR><FONT size=2>&nbsp; 
theform.submit();</FONT> <BR><FONT size=2>&nbsp;}</FONT> <BR><FONT size=2>// 
--&gt;</FONT> <BR><FONT size=2>&lt;/script&gt;</FONT> </P>
<P><FONT size=2>...</FONT> </P>
<P><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;select name="blah" id="blah" 
onchange="__doPostBack('blah','')" language="javascript" &gt;</FONT> 
</P></BODY></HTML>

------_=_NextPart_001_01C309DF.BD24FA20--