[Chameleon] last of my button troubles?

Paul Spencer pagameba at magma.ca
Mon May 10 11:04:15 EDT 2004


Bart,

I will incorporate this into the cvs version right now, good catch.

The dummy parameter null was necessitated by the fact that the button 
callbacks always pass the javascript button object as the first 
parameter.  This is necessary to support client code that wants to 
modify the button in some way in response to the user clicking it (like 
disabling buttons etc).

We have not yet taken full (or perhaps any ;)) advantage of this, but it 
is planned for future work and I didn't want to change the API later.

Cheers,

Paul

bartvde at xs4all.nl wrote:

> Hi,
> 
> I just found the solution, in makeButton I changed the following:
> 
> $szImageID = md5($szJSCallback.$szJSParam.$szClassName.$szGraphic.$szLabel);
> 
> The image id is now unique also when the only difference is in the value
> of $szJSParam.
> 
> Paul, can you incorporate this change into CVS? One thing I still don't
> understand is why there is a dummy first parameter (null).
> 
> Best regards,
> Bart
> 
> 
>>I just saw both buttons get the exact same id and name in HTML, maybe this
>>is causing the problems?
>>
>>Any way to make sure the id's are completely unique?
>>
>><img name="fc4252aa6a7ec90390ba83b7b36d9e75"
>>id="fc4252aa6a7ec90390ba83b7b36d9e75"
>>src="/ms_tmp/buttons/40979ff60e7c9befa43ca6361bee1b6d.png" width="75"
>>height="24" ALT="Bewaren" TITLE="Bewaren" BORDER="0">
>><script language="Javascript">
>>goCWCButtonManager.AddButton( new
>>CWCButton("fc4252aa6a7ec90390ba83b7b36d9e75", 0, "null", download, "map",
>>"/ms_tmp/buttons/40979ff60e7c9befa43ca6361bee1b6d.png",
>>"/ms_tmp/buttons/10e93e4fa89a287f98cd0cadb5319648.png",
>>"/ms_tmp/buttons/00576e02b4781b921f1115df82410c35.png",
>>"/ms_tmp/buttons/d5082f0b6c01ea514cd225acedd78aa9.png") );
>>
>>Best regards,
>>Bart
>>
>>
>>>Hi Paul (cc list),
>>>
>>>I did get the button parameters working in Mozilla, but not in IE.
>>>
>>>Why does the makeButton function always prepend a "null" as the first
>>>parameter value?
>>>
>>>I had to adapt my function to insert a dummy first parameter in order to
>>>get it working:
>>>
>>>function openPreview(dummy, format)
>>>
>>>Also the makeButton function adds its own quotes around the string, so I
>>>had to remove those in my makeButton call (layout instead of 'layout').
>>>
>>><?php echo makeButton( 'download', layout, 'GeoservicesPrint',
>>>'images/icon_save.png', trim($oMLT->get("23", "Download")),
>>>trim($oMLT->get("23", "Download")), array( 'width' => 75 )); ?>
>>>
>>>As I said in Mozilla it works, but in IE not. I have 2 buttons which
>>>call
>>>the same js function, but with a different parameter (layout and map).
>>>The
>>>second button does not hover and cannot be clicked in IE.
>>>
>>>Any thoughts, this must be something pretty deep in the button core?
>>>
>>>Thanks in advance.
>>>
>>>Best regards,
>>>Bart
>>>_______________________________________________
>>>Chameleon mailing list
>>>Chameleon at lists.maptools.org
>>>http://lists.maptools.org/mailman/listinfo/chameleon
>>>
>>
>>_______________________________________________
>>Chameleon mailing list
>>Chameleon at lists.maptools.org
>>http://lists.maptools.org/mailman/listinfo/chameleon
>>
> 
> 
> _______________________________________________
> Chameleon mailing list
> Chameleon at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/chameleon
> 

-- 
  -----------------------------------------------------------------
|Paul Spencer                           pspencer at dmsolutions.ca   |
|-----------------------------------------------------------------|
|Applications & Software Development                              |
|DM Solutions Group Inc                 http://www.dmsolutions.ca/|
  -----------------------------------------------------------------



More information about the Chameleon mailing list