<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1479" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Jennifer,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>If you are using shapefiles, you should be able to 
put the links in the attributes.</FONT></DIV>
<DIV><FONT face=Arial size=2>The attribute would be a string, of the 
form:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><A HREF='fileToLinkTo.mpg' TARGET=#>Click to 
view movie</A></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>If you are using excel, you can use the concatenate 
function to have a fixed beginning of the string, vary the link and the name, 
and have a fixed ending. Concatenate them, and place it in one cell, then save 
to DBF. That is the easiest way to automate it.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This should work, because we did it ourselves 
too.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>regards,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Jacob</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>-----Original Message-----<BR>From: <A 
href="mailto:chameleon-bounces@lists.maptools.org">chameleon-bounces@lists.maptools.org</A><BR>To: 
<A 
href="mailto:chameleon@lists.maptools.org">chameleon@lists.maptools.org</A><BR>Sent: 
2/11/2005 11:18 AM<BR>Subject: [Chameleon] widget within a widget</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Hello-</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Thank you, Paul, for the tips.  I'll try to 
better explain what it is<BR>I want to do.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>I would like to be able to offer a link to another 
website from within<BR>the pop-up query window.  (E.g. A user would select 
the query tool,<BR>click on a point, which has standard attributes displayed in 
the query<BR>window but is also associated with an online movie or an 
online<BR>database.)  But I would like the link to appear associated with 
the<BR>query result or layer to which it applies (perhaps in an 
additional<BR>result cell or in the same bar as the layer title).  Ideally, 
clicking<BR>on this link in the query window will open the specified URL 
in<BR>another browser window.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Since widgets can't really be embedded within one 
another, I am<BR>guessing the Query widget will need to be further 
modified.  A<BR>colleague of mine and I modified it already to show a photo 
in the<BR>bottom of the query window, the title of which is specified in the 
dbf<BR>file for the layer.  My first thought was to somehow build on 
this<BR>functionality (using the dbf to hold the URLs), but it appears to be 
a<BR>much more complicated task.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Several colleagues are helping me to figure this 
one out and we would<BR>really appreciate any direction you could offer.  
Thank you much!</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Jennifer Zeisloft</FONT></DIV>
<DIV> </DIV><FONT face=Arial size=2>
<DIV><BR>On Thu, 10 Feb 2005 20:20:49 -0500, Paul Spencer<BR><<A 
href="mailto:pspencer@dmsolutions.ca">pspencer@dmsolutions.ca</A>> 
wrote:<BR>> Jennifer ... sorry for the delay in responding 
...<BR>><BR>> Jennifer Zeisloft wrote:<BR>> > Hello All-<BR>> 
><BR>> > I am attempting to place a widget within a widget, but am 
uncertain<BR>> > how to do this or whether this is even 
possible.<BR>><BR>> technically it is not.  From reading ahead, I 
think you are attempting<BR>> to return the tag for a widget from another 
widget.  At the time that<BR>> this code is run, all widgets have been 
parsed and no more will be<BR>> created.  You'll end up with the text of 
the widget tag in your<BR>> application, but it won't be visible (except for 
broken images for the<BR>> <image ...> tags because the browser will 
suppress the output thinking<BR>> they are invalid HTML tags.<BR>><BR>> 
><BR>> > Specifically, I am trying to place the Link widget within the 
Query<BR>> > widget.  Ideally, I would like to place a link button on 
the title<BR>bar<BR>> > of each layer appearing in the query window that 
is hotlinked to<BR>> > another resource.  I attempted to call the 
widget from within a<BR>second<BR>> > <td> tag for the formatting of 
the layer title row:<BR>> ><BR>> > $szReturnValue .= "<td 
colspan=\"2\" class=\"titleArea\"><p<BR>> > 
class=\"text\"><u><b>$szTitle</b></u></p></td>\n";<BR>> 
><BR>> > $szReturnValue .= "<td><cwc2 type="Link" 
visible="true"<BR>imagetip="Link<BR>> > to additional resources" URL="<A 
href="http://www.google.com">http://www.google.com</A>"<BR>PopupWidth="500"<BR>> 
> PopupHeight="600" image="icons/icon_link.png" toolset="Navigation"<BR>> 
> styleresource="NavButtons" popupstyleresource="TextButtons"><BR>> 
>              
<image state="normal"/><BR>> 
>              
<image state="hover"/><BR>> 
>              
<image state="selected"/><BR>> > 
</cwc2></td>\n";<BR>> ><BR>> > $szReturnValue .= 
"</tr>\n";<BR>> ><BR>> > But received an error:<BR>> 
><BR>> > Parse error: parse error, unexpected T_STRING in<BR>> > 
C:\ms4w\apps\chameleon\htdocs\widgets\Query\QueryResults.phtml 
on<BR>line<BR>> > 401<BR>> ><BR>><BR>> even though this won't 
work, the error is because of your use of<BR>quotes.<BR>>  You have 
double quotes (") around your string, and also double quotes<BR>> within your 
string.  To get around this, you can also use 
single<BR>quotes.<BR>><BR>> $szReturnValue .= "<td colspan=\"2\" 
class=\"titleArea\"><p<BR>>  
class=\"text\"><u><b>$szTitle</b></u></p></td>\n";<BR>><BR>>  
$szReturnValue .= '<td><cwc2 type="Link" 
visible="true"<BR>imagetip="Link<BR>>  to additional resources" URL="<A 
href="http://www.google.com">http://www.google.com</A>" 
PopupWidth="500"<BR>>  PopupHeight="600" image="icons/icon_link.png" 
toolset="Navigation"<BR>>  styleresource="NavButtons" 
popupstyleresource="TextButtons"><BR>>               
<image 
state="normal"/><BR>>               
<image 
state="hover"/><BR>>               
<image state="selected"/><BR>>  
</cwc2></td>'."\n";<BR>><BR>> note that I concatenated the \n 
in double quotes.  PHP treats<BR>> single-quoted strings literally and 
won't honour your \n as a carriage<BR>> return - nor would it replace 
$variables ...<BR>><BR>><BR>> > I have to admit (if it isn't already 
painfully obvious) that I have<BR>> > very minimal computer programming / 
php experience.  While I am<BR>fairly<BR>> > certain I can write the 
function to utilize URLs from a dbf file and<BR>> > the code to make the 
widget appear only when appropriate, I am lost<BR>as<BR>> > to where or 
how to place the code (and am I missing some other code<BR>> > that would 
be required to do this??) to call the Link widget in the<BR>> > first 
place.<BR>> ><BR>> > I am extremely grateful for any advice you can 
offer.  Thank you in<BR>> > advance for your help!<BR>><BR>> um 
I'm not entirely certain what you are trying to accomplish.  Could<BR>> 
you explain it in functional terms and perhaps I can point you in the<BR>> 
right direction.<BR>><BR>> ><BR>> > Jennifer Zeisloft<BR>> 
> _______________________________________________<BR>> > Chameleon 
mailing list<BR>> > <A 
href="mailto:Chameleon@lists.maptools.org">Chameleon@lists.maptools.org</A><BR>> 
> <A 
href="http://lists.maptools.org/mailman/listinfo/chameleon">http://lists.maptools.org/mailman/listinfo/chameleon</A><BR>> 
><BR>><BR>> Cheers<BR>><BR>> Paul<BR>> --<BR>> 
+-----------------------------------------------------------------+<BR>> 
|Paul 
Spencer                           
<A href="mailto:pspencer@dmsolutions.ca">pspencer@dmsolutions.ca</A>   
|<BR>> 
+-----------------------------------------------------------------+<BR>> 
|Applications & Software 
Development                              
|<BR>> |DM Solutions Group 
Inc                 
<A href="http://www.dmsolutions.ca/">http://www.dmsolutions.ca/</A>|<BR>> 
+-----------------------------------------------------------------+<BR>><BR>_______________________________________________<BR>Chameleon 
mailing list<BR><A 
href="mailto:Chameleon@lists.maptools.org">Chameleon@lists.maptools.org</A><BR><A 
href="http://lists.maptools.org/mailman/listinfo/chameleon">http://lists.maptools.org/mailman/listinfo/chameleon</A><BR></DIV>
<DIV> </DIV>
<DIV> </DIV></FONT>
<DIV><FONT face=Arial size=2>JACOB DELFOS<BR>SPATIAL INFORMATION 
ANALYST<BR>Maunsell Australia Pty Ltd<BR>629 Newcastle Street, WA 6007<BR>PO Box 
81, WA 6902<BR>Leederville <BR>Western Australia<BR>ABN 20 093 846 
925</FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>Tel     + 61 8 9281 
6185<BR>Fax    + 61 8 9281 6297<BR><A 
href="mailto:jacob.delfos@maunsell.com">jacob.delfos@maunsell.com</A></FONT></DIV></BODY></HTML>