<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7638.1">
<TITLE>Invoke Script problem</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Has anyone else experienced a problem using Invoke Script?</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">I'm using the example from the developers guide p49 "<B></B></FONT><B><FONT SIZE=2 FACE="GillSans-Bold">Example: Listing Selected Parcels (DWF Viewer)</FONT></B><FONT SIZE=2 FACE="Arial">" and have converted the example for use with C#. However, merely adding the button with Invoke script causes Mapguide Studio to error when in Preview (I don't get as far as actioning the command). </FONT></P>
<P> <FONT SIZE=2 FACE="Arial">"'length' is not null or not an object"</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">If I go into debug it's on the line </FONT>
</P>
<P> <FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">for</FONT><FONT SIZE=2 FACE="Courier New">(</FONT><FONT COLOR="#0000FF" SIZE=2 FACE="Courier New">var</FONT><FONT SIZE=2 FACE="Courier New"> i = 0; i < toolbarDef.length; i++) // in toolbar.aspx</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Courier New">I set it up by following the instruction on p50,</FONT>
</P>
<P> <FONT SIZE=2 FACE="Courier New">"</FONT><FONT SIZE=2 FACE="StoneSerif">Set the script to invoke to </FONT> <FONT SIZE=1 FACE="CourierNewPSMT">parent.listSelected();</FONT><FONT SIZE=2 FACE="Arial">"</FONT>
</P>
<P><FONT SIZE=2 FACE="Courier New">I created the file containing the required text and set the</FONT> <FONT SIZE=2 FACE="Arial">Additional Parameters tab to reference it,</FONT>
</P>
<P> <FONT SIZE=2 FACE="Courier New">"..\TestDotNetviewersample\getselected.txt"</FONT>
</P>
<BR>
<P><FONT SIZE=2 FACE="Arial">Alternatively, if I put the script text directly in the Additional Parameters tab, then nothing happens when actioning the command.</FONT></P>
<P><FONT SIZE=2 FACE="Arial">Regards</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">Paul Jones</FONT>
</P>
<BR>
<BR>
<BR>
<BR>
<BR>
<br><br>
<P align=center><FONT style="BACKGROUND-COLOR: #ffffff" color=#ff0000><STRONG><FONT face="MS Sans Serif"><FONT size=2><FONT color=#000000>This email and any attached files are confidential and copyright protected. If you are not the addressee, any dissemination of this communication is strictly prohibited. Unless otherwise expressly agreed in writing, nothing stated in this communication shall be legally binding</FONT>.</FONT></FONT></STRONG></FONT></P></NOBR>
<P align=center>The ultimate parent company of the Atkins Group is WS Atkins plc. Registered in England No. 1885586. Registered Office Woodcote Grove, Ashley Road, Epsom, Surrey KT18 5BW.</P><NOBR>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt" align=center><FONT face="MS Sans Serif"><FONT size=2><SPAN style="FONT-SIZE: 18pt; COLOR: green; FONT-FAMILY: Webdings">P</SPAN><SPAN style="COLOR: navy"> </SPAN><STRONG><SPAN style="COLOR: green; FONT-FAMILY: Arial">Consider the environment.</SPAN></STRONG><SPAN style="COLOR: blue"> </SPAN><STRONG><SPAN style="COLOR: green; FONT-FAMILY: Arial">Please don't print this e-mail unless you really need to.</SPAN></STRONG></FONT></FONT></P>
</body>
</HTML>