[Chameleon] Creating my own Widget
Robin Robin
querada499 at hotmail.com
Fri Sep 10 13:36:44 EDT 2004
Hi,
Thanks for all of your help.
You mentioned: "The javascript names and form field names cannot be the same
as other's on the page."
I'm not sure this is the case. When I started, the first thing I did was
create add a second copy of the query widget to my map. Both buttons
worked. Is this a situation where you thought there would be a problem?
Maybe it's not quite the same since both buttons were refering to the same
widget?
You also said I should change the javascript functions and the hidden
variables. Do you mean the functions in the Hotlink.Widget.php file? I'm
pretty new at this so I wasn't sure.
Thanks again
Robin
>From: "Godwin, Elizabeth" <Godwinl at AGR.GC.CA>
>To: "Robin Robin" <querada499 at hotmail.com>, <chameleon at lists.maptools.org>
>Subject: RE: [Chameleon] Creating my own Widget
>Date: Fri, 10 Sep 2004 13:14:26 -0400
>
>Hi,
>
>I discovered when customizing a query widget myself that if using the
>query widget and also the customized widget that whichever is drawn on
>the page last is the one that works.
>
>Try isolating only your custom hotlink tool and get it working, then
>once that is ok, you'll have to do more to the widget code to get them
>co-existing. the NAV_CMD should be changed, as well as the javascript
>functions that are written out and the hidden variables. The javascript
>names and form field names cannot be the same as other's on the page.
>
>Using Firefox is a good tool as Ken-ichi mentioned. Both for errors and
>form details and also for checking source of the HTML page after it
>comes out. if that custom template isn't written out into javascript,
>you can be sure that it won't pop up.
>
>Keep us posted.
>
>Liz
>
>-----Original Message-----
>From: chameleon-bounces at lists.maptools.org
>[mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Robin Robin
>Sent: September 10, 2004 9:51 AM
>To: chameleon at lists.maptools.org
>Subject: [Chameleon] Creating my own Widget
>
>
>Hello all,
>
>I am trying to create my own widget and I am running into some problems.
>I
>am trying to create a hotlink widget which will work similar to identify
>but
>will open a webpage when the location on the map is clicked. I plan to
>do
>this by copying and modifying the query widget.
>
>I started by simply copying the query widget and renaming it. I wanted
>to
>check that it still worked once the name has been changed. It doesn't!
>So
>far, I changed the folder name to Hotlink, I have changed
>QueryResults.phtml
>to HotlinkResults.phtml and Query.widget.php to Hotlink.widget.php. I
>have
>also changed in Hotlink.widget.php the class and constructor names from
>Query to Hotlink (as per instructions in an old thread I found in the
>chameleon archives).
>
>When I click on my hotlink button the map redraws and nothing happens.
>If I
>click the same point with my identify/query button I get a popup window
>with
>the query results. Since I haven't changed any of the actual
>functionality
>yet, both buttons should produce the same results.
>
>Are there other places where I have to change/add to files so that my
>new
>widget will be recognized? In an older message someone mentioned
>changing
>the MapDHTMLWidget.widget.php but I couldn't tell where it should be
>changed
>(I did a text search for query).
>
>Any help would be appreciated.
>
>Thanks
>
>_________________________________________________________________
>The new MSN 8: advanced junk mail protection and 2 months FREE*
>http://join.msn.com/?page=features/junkmail
>
>_______________________________________________
>Chameleon mailing list
>Chameleon at lists.maptools.org
>http://lists.maptools.org/mailman/listinfo/chameleon
_________________________________________________________________
Add photos to your messages with MSN 8. Get 2 months FREE*.
http://join.msn.com/?page=features/featuredemail
More information about the Chameleon
mailing list