You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by no...@comments.apache.org on 2013/07/19 11:34:41 UTC

Rainer commented on http://tapestry.apache.org/javascript.html

Hello,
    Rainer has commented on http://tapestry.apache.org/javascript.html. 
    You can find the comment here:
    http://tapestry.apache.org/javascript.html#comment_1503
    Please note that if the comment contains a hyperlink, it must be approved
    before it is shown on the site.

    Below is the reply that was posted:
    ~~~~
    The sample code for addScript is wrong. It needs to reference the id via the # prefix. Otherwise it will not be found:

javaScriptSupport.addScript(
        "$('#%s').observe('click', hideMe());",
        container.getClientId());

Notice the #%s

In addition, approach 2 has to be done in afterRender rather than setupRender, otherwise the client id is not properly set.
    ~~~~

    With regards,
    The Apache Tapestry Project.

    You are receiving this email because you have subscribed to changes for the tapestry site.
    To stop receiving these emails, unsubscribe from the mailing list that is providing these notifications.
	    

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org