<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7233.69">
<TITLE>Creating a new widget</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>Hello List,<BR>
<BR>
I'm trying you create a widget using the tutorial from here<BR>
<A HREF="http://chameleon-tiki.maptools.org/tiki-index.php?page=Developing+a+new">http://chameleon-tiki.maptools.org/tiki-index.php?page=Developing+a+new</A><BR>
+Chameleon+Widget#attachments<BR>
<BR>
Everthing works up to when I modify <BR>
"function GetJavascriptFunctions()" by adding the following.<BR>
<BR>
#########################################<BR>
function GetJavascriptFunctions()<BR>
{<BR>
// init vars<BR>
$aReturn = parent::GetJavascriptFunctions();<BR>
<BR>
///////// ADD CODE HERE IF NECESSARY /////////<BR>
// show the report<BR>
$szShowReport = strlen( $this->mszReport ) ><BR>
0?"alert('".$this->mszReport."')":"";<BR>
$szJsFunctionName = "showReport";<BR>
$szFunction = <<<EOT<BR>
{<BR>
{$szShowReport};<BR>
return true;<BR>
}<BR>
EOT;<BR>
<BR>
$aReturn[$szJsFunctionName] = $szFunction;<BR>
<BR>
// return<BR>
return $aReturn;<BR>
<BR>
// end GetJavascriptFunctions() function<BR>
}<BR>
#########################################<BR>
<BR>
If the application is loaded with this function enabled everthing is<BR>
displayed except the map and the key map. Also the mouse click will not<BR>
submit.<BR>
<BR>
Is anyone able to help ?<BR>
<BR>
Really all I want is a widget that will allow me to display a list of<BR>
feature names from a postgis database, for example street names, and<BR>
zoom to the feature selected from the list.<BR>
<BR>
I have an application that does pretty well all that I need, except this<BR>
searching ablility, and unfortunately without searching it is as good as<BR>
useless.<BR>
<BR>
Is anyone able to point me to some detailed documentation on Chameleon<BR>
eg "Chameleon for Dummies",(I know it is wishful thinking, but no harm<BR>
in asking). I've been struggling for months as most of the documentation<BR>
I've found assumes you already have a pretty good grasp of PHP,<BR>
Javascript, Mapserver and even Chameleon. Unfortunately in my case this<BR>
is not so.<BR>
<BR>
I was very impressed when I first discovered Chameleon after trying to<BR>
generate an application from scratch using Mapscript (especially the<BR>
zoom box) but getting to this point and not being able to proceed any<BR>
further is making me think I should "cut my losses" and return to<BR>
mapscript, where at least I could do the searching that I require.<BR>
<BR>
Well I've had my whinge, if anyone has any suggestions (now be nice)<BR>
please let me know.<BR>
<BR>
Cheers<BR>
Rob Male<BR>
</FONT>
</P>
</BODY>
</HTML>