The only thing I would change about that solution is use the q() function
instead of document.getElementById.

q('#...').on('click', this.handler, this)
On Apr 29, 2013 11:09 PM, "Tobias Koller (GERMO GmbH)" <[email protected]> wrote:

>  Hi,****
>
> ** **
>
> I tried a couple of things and found this solution:****
>
> ** **
>
> var html = new qx.ui.embed.Html();****
>
> html.setHtml("TEST <a href='#' id='clickme'>click me</a> TEST");****
>
>                                ****
>
> html.addListenerOnce("appear", function(){****
>
>   var link = document.getElementById("clickme");****
>
>   link.onclick = function(){****
>
>       alert("clicked");****
>
>   }****
>
> });****
>
> ** **
>
> ** **
>
> This will add an onclick-handler to the link after the application
> appeared.****
>
> ** **
>
> Tobi****
>
> ** **
>
> *Von:* fei wang [mailto:[email protected]]
> *Gesendet:* Dienstag, 30. April 2013 06:47
> *An:* qooxdoo Development
> *Betreff:* Re: [qooxdoo-devel] How to call Qx method when clicking
> anchors ?****
>
> ** **
>
> But for this snipplet : ****
>
> -----------------------****
>
> html.setHtml("TEXT<a href=’#‘ onclick=‘js();'>click me</a>TEXT2");****
>
> -----------------------****
>
> ** **
>
> If I add click event listener to the qx.ui.embed.Html object,****
>
> The event will be triggered if I click 'TEXT' or 'click me' or 'TEXT2'.***
> *
>
> ** **
>
> I want to fire the event only when clicking 'click me', How should I do?**
> **
>
> ** **
>
> On Mon, Apr 29, 2013 at 9:33 PM, Loren Schlomer <[email protected]>
> wrote:****
>
> Add a click event listener to the qx.ui.embed.Html object instead of
> inside the anchor****
>
> On Apr 29, 2013 5:28 AM, "fei wang" <[email protected]> wrote:****
>
>   Hi,****
>
> ** **
>
> ** **
>
> In my Application.js, I have two snipplet below:****
>
> ** **
>
> [Snipplet 1]****
>
> var html = new qx.ui.embed.Html();****
>
> html.setHtml("<a href=’#‘ onclick=‘js();'>click me</a>");****
>
> ** **
>
> [Snipplet 2]****
>
> closeWin : function() {****
>
> ...****
>
> }****
>
> ** **
>
> I want to call 'closeWin' method when I click the 'click me' text, How
> should I do ?****
>
> ** **
>
> ** **
>
> Regargs,****
>
> Wang Fei****
>
> ** **
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel****
>
>
>
> ------------------------------------------------------------------------------
> Try New Relic Now & We'll Send You this Cool Shirt
> New Relic is the only SaaS-based application performance monitoring service
> that delivers powerful full stack analytics. Optimize and monitor your
> browser, app, & servers with just a few lines of code. Try New Relic
> and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_apr
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel****
>
> ** **
>
>
> ------------------------------------------------------------------------------
> Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
> Get 100% visibility into your production application - at no cost.
> Code-level diagnostics for performance bottlenecks with <2% overhead
> Download for free and get started troubleshooting in minutes.
> http://p.sf.net/sfu/appdyn_d2d_ap1
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to