Groups
Groups
Sign in
Groups
Groups
Embedded JavaScript
Conversations
About
Send feedback
Help
EJS and event handling
1,251 views
Skip to first unread message
Sel
unread,
Nov 5, 2009, 6:18:04 AM
11/5/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Embedded JavaScript
Hi,
I know that JMVC covers it but i don't want to use JMVC in current
project (i have different design pattern than suggesten in jmvc).
What i have to do is to trigger an event on a component that stores
the view(ejs).
I want to:
<div id="middleCol_menu">
<a href="#" onclick=" <% trigger('tabChange') %>"
class="tab_first">Click!</a>
</div>
and initialization:
var Component = new JS.Class({
render: function() {
return this._template.render(this);
},
trigger: function(eventName) {
alert('event: ' + eventName + ' triggered');
}
})
How can I do this think?
Is it possible to call the template function after it's rendered?
Justin Meyer
unread,
Nov 5, 2009, 10:19:49 AM
11/5/09
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to embeddedj...@googlegroups.com
After you inject it in the dom, find the element and attach the event
handler.
Sent from my iPhone
Reply all
Reply to author
Forward
0 new messages