[Chameleon] another button question (bug?)
Bart van den Eijnden
bartvde at xs4all.nl
Tue May 4 15:28:01 EDT 2004
Hi Paul,
this is all a bit of a misunderstandig on my side of how things work.
I had set the on click event like this (so including the brackets for the
function):
$this->moButton->SetOnClick('myfunction()');
and then Chameleon would create this:
<a href="javascript:void(0);" onclick='myfunction()(null, "")'>
The function would be called, but would generate a javascript error that
myfunction() is not a function.
When I leave out the brackets in the SetOnClick function there is no
problem.
Best regards,
Bart
On Tue, 04 May 2004 10:25:34 -0400, Paul Spencer <pagameba at magma.ca> wrote:
> Bart,
>
> how does this generate an error message? This looks valid to me ... but
> this is the case when you don't have multi-state buttons I think. It
> occurs to me that I haven't tested that in a while. Hopefully I will
> get a chance to check today and let you know.
>
> Paul
>
>
>
> bartvde at xs4all.nl wrote:
>
>> Hi list,
>>
>> if I use a widget which is not part of a toolset (no toolset attribute
>> defined for the widget in the template) the code in Button.php appends
>> some default parameters to the name of the onclick function. This
>> results
>> in the fact that you will get a javascript error that the corresponding
>> function is not defined. Is this intentional?
>>
>> An example to illustrate what I encountered:
>> <a href="javascript:void(0);" onclick='onClickServerManagerDialog(null,
>> "")'>
>>
>> Best regards,
>> Bart
>> _______________________________________________
>> Chameleon mailing list
>> Chameleon at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/chameleon
>>
>
--
More information about the Chameleon
mailing list