[Kss-devel] simulate mouse click
Luis Miguel Braga
lmb at eurotux.com
Tue May 27 16:48:56 CEST 2008
Hi,
Off the top of my head.... did you try triggering the kss click event?
I mean triggering the event from inside kss. I know there are examples
of this on the site.
Best regards,
Luís Miguel Braga
Massimo Azzolini wrote:
> Hi all,
>
> I need to simulate a click on a kss-ed element on my page's DOM.
>
> I have a button element:
>
> <button id="my_id" class="selected">...</button>
>
> on which there is a KSS selector:
>
> button.selected:click{
> ... do stuff
> }
>
> I open a popup window and, clicking on a anchor/button/whatever on it,
> I need to simulate a click on that "button.selected". In this way kss
> stuff should run etc.
>
> I did something like:
> <script>
> function f(){
> document.getElementById(my_id).click()
> }
> </script>
>
> but it works if applied on a standard button (e.g. <button
> tal:attributes="name string:theSubmitButton-$fieldName; id
> string:theSubmitButton-$fieldName;" onClick="alert('The button was
> clicked.');">...</button>), but not on kss-ed one...
>
> any hint?
>
> thanks, bye
>
> massimo
> _______________________________________________
> Kss-devel mailing list
> Kss-devel at codespeak.net
> http://codespeak.net/mailman/listinfo/kss-devel
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://codespeak.net/pipermail/kss-devel/attachments/20080527/265075c8/attachment.pgp
More information about the Kss-devel
mailing list