<DIV>Hi:</DIV>  <DIV>&nbsp;</DIV>  <DIV>I am using Dbox and the example provided by Rich Greenwood, to map the results from a database query. I have modified the script so you can change the queryfile, qitem and qstring. The script works OK on 1 layer, but for others I get NaN. Before to map the results I test ( alert(qlayer, qitem, qstring)) to see if the queryfile, qitem and qstring are correct. Even though I have the core ct names for each one I still get NaN results</DIV>  <DIV>What could be the problem?</DIV>  <DIV>&nbsp;</DIV>  <DIV>script from the database query results</DIV><FONT color=#0000ff size=2>  <DIV>&lt;</FONT><FONT color=#800000 size=2>script</FONT><FONT size=2> </FONT><FONT color=#ff0000 size=2>type</FONT><FONT color=#0000ff size=2>="text/javascript"</FONT><FONT size=2> </FONT><FONT color=#ff0000 size=2>language</FONT><FONT color=#0000ff size=2>="javascript"&gt;</DIV></FONT><FONT size=2>  <DIV></FONT><FONT color=#0000ff size=2>var</FONT><FONT size=2>
 qlayer = </FONT><FONT color=#800000 size=2>"anyQlayer"</FONT><FONT size=2>;</DIV>  <DIV></FONT><FONT color=#0000ff size=2>var</FONT><FONT size=2> qitem = </FONT><FONT color=#800000 size=2>"anyQitem"</FONT><FONT size=2>;</DIV></FONT><FONT size=2>  <DIV></FONT><FONT color=#0000ff size=2>function</FONT><FONT size=2> map(qstring)</DIV>  <DIV></FONT><FONT color=#008000 size=2>{</DIV></FONT><FONT size=2>  <DIV>opener.itemQueryModified(qstring, qitem, qlayer);</DIV>  <DIV>window.close();</DIV>  <DIV>opener.focus();</DIV>  <DIV>}</DIV></FONT><FONT color=#0000ff size=2>  <DIV>&lt;/</FONT><FONT color=#800000 size=2>script</FONT><FONT color=#0000ff size=2>&gt;</DIV></FONT>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;</DIV>  <DIV>modified itemQuery script </DIV>  <DIV>&nbsp;ms.itemqueryoptions = "&amp;mapext=shapes&amp;savequery=true&amp;";<BR>&nbsp;function itemQueryModified(qstring, qitem, qlayer)<BR>&nbsp;{<BR>&nbsp;&nbsp;//ms.setLayer(qlayer, true);<BR>&nbsp;&nbsp;var uri = ms.mapserver +
 '?map=' + ms.mapfile + "&amp;layers=" + ms.getLayers("+") + "&amp;mapsize=" + ms.width + "+" + ms.height;<BR>&nbsp;&nbsp;uri += ms.itemqueryoptions;<BR>&nbsp;&nbsp;uri += '&amp;mode=itemquery'<BR>&nbsp;&nbsp;uri += '&amp;qlayer=' + qlayer;<BR>&nbsp;&nbsp;uri += '&amp;qitem=' + qitem;<BR>&nbsp;&nbsp;uri += '&amp;qstring=' + qstring;<BR>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;var response = get_content(uri);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;var tokens = response.split(',');<BR>&nbsp;&nbsp;alert(qstring + qitem + qlayer + ", " + Number(tokens[1]), Number(tokens[2]), Number(tokens[3]), Number(tokens[4]));<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;ms.setExtent(Number(tokens[1]), Number(tokens[2]), Number(tokens[3]), Number(tokens[4]));<BR>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;main.setImage(tokens[5]);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;ms.savedqueryfile=tokens[6];<BR>&nbsp;&nbsp;domouseclick('pan');<BR>&nbsp;}</DIV>  <DIV>&nbsp;</DIV>  <DIV>&nbsp;</DIV><p>&#32;

<hr size=1>Need Mail bonding?<br>Go to the <a href="http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396546091">Yahoo! Mail Q&A</a> for <a href="http://answers.yahoo.com/dir/index;_ylc=X3oDMTFvbGNhMGE3BF9TAzM5NjU0NTEwOARfcwMzOTY1NDUxMDMEc2VjA21haWxfdGFnbGluZQRzbGsDbWFpbF90YWcx?link=ask&sid=396546091">great tips from Yahoo! Answers</a> users.