<!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.0.6487.1">
<TITLE>Chameleon Point-URL link in QueryResults</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->
<P><FONT SIZE=2 FACE="Arial">Hi there,</FONT>
</P>
<P> <FONT SIZE=2 FACE="Arial">I'm attempting to configure Chameleon 1.0.5 for forwarding based on query results… basically, if the user clicks on the 'queryable' tab, and then on a point on the map, the resulting QueryResults contain all of the valid query results. However, for a specific layer (say layer x), with a specific table (say table y), if a point in that layer is clicked, I want to add a link to QueryResults which passes the corresponding value from table y in layer x as a parameter to an external website… For example, if the user clicks on a point containing a value in layer x->table y, then that value, say z should be passed on in the following format: </FONT><A HREF="http://www.yoursite.com/forward.php?id=***z***"><U><FONT COLOR="#0000FF" SIZE=2 FACE="Arial">http://www.yoursite.com/forward.php?id=***z***</FONT></U></A><FONT SIZE=2 FACE="Arial"> . From what I've seen so far, I'll apparently be required to modify the file /cwc2path/htdocs/widgets/QueryResults.phtml . My question is this; where exactly in the file would I be able to do a string comparison such that I can determine whether the layer name is equal to "x" for layer x? I've tried the following(with added code inside if statements);</FONT></P>
<P><FONT SIZE=2 FACE="Arial">~Line 800 ---</FONT>
<BR> <FONT SIZE=2 FACE="Arial">if (strcmp ($szTypeName, "tablename")==0)</FONT>
<BR> <FONT SIZE=2 FACE="Arial">{</FONT>
<BR> <FONT SIZE=2 FACE="Arial">$szValue="<a href = \"<A HREF="http://www.yoursite.ca/script.php?parameter=">http://www.yoursite.ca/script.php?parameter=</A>".$szValue."\">".$szValue."</a>";</FONT></P>
<P> <FONT SIZE=2 FACE="Arial">}</FONT>
</P>
<P><FONT SIZE=2 FACE="Arial">… this should replace the plain text VALUE for tablename with a hypertext link pointing to the desired site with the associated table value as a parameter. I've been unable to get this working … any suggestions/comments would be greatly appreciated.</FONT></P>
<P> <FONT SIZE=2 FACE="Arial">Steven D'Cruz</FONT>
<BR> <FONT SIZE=2 FACE="Arial">Steven.Dcruz@ec.gc.ca</FONT>
<BR> <FONT SIZE=2 FACE="Arial">webaxis@yahoo.com</FONT>
<BR> <FONT SIZE=2 FACE="Arial">Environment Canada</FONT>
</P>
</BODY>
</HTML>