You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by SakshiAgarwal <sa...@gmail.com> on 2010/06/16 16:12:00 UTC

Invoke Javascript using LinkSubmit

Hi,

i have used multiple options to invoke javascript on clicking linkSubmit,
but none works, although they all work with Submit.
a) Invoking javascript from tml page as follows:
 <script>
  function extraStep() {
    alert("ENTER extraStep");   
  }
</script> 
 <t:loop source="photoDetails" value="each"> -${each.title}  <br />    	
       	<t:form t:id="formId" id="formId"><p>
    	<t:label for="reportedCategory"/>  <t:select t:id="reportedCategory"
t:label="Reported Category"/></p>
    	[<t:actionlink t:id="approvePhotos">Approve</t:actionlink>]
          	 <input type="hidden" id="photoObject" value="${each}" />
    	<t:submit t:id="disapprovePhoto" value="Disapprove Photo" 
onclick="extraStep();"></t:submit>
      	 </t:form>       	 
       	 </t:loop>    	
** This works with Submit but not with linkSubmit
b) tried using mixins, but didnt work with LinkSubmit
c) tried using JSON, but that also didnt work with LinkSubmit. afterRender()
does not get invoked.
onSuccess(),onSelectedFromDisapprovePhoto() methods are not invoked from
Linksubmit.

Can someone please advise how can I use LinkSubmit in order to invoke
javascript.
Looking forward for an early response.

regards
sakshi
-- 
View this message in context: http://old.nabble.com/Invoke-Javascript-using-LinkSubmit-tp28903316p28903316.html
Sent from the Tapestry - Dev mailing list archive at Nabble.com.


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


Re: Invoke Javascript using LinkSubmit

Posted by "Thiago H. de Paula Figueiredo" <th...@gmail.com>.
Hi!

The right place to post questions is on the users mailing list, not the  
dev list or JIRA.

-- 
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer,  
and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

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