Should use "Event Handler", when I attach value to text box (readonly)?


For example I have one text box with readonly style, and then I attach the value to it by click other button.
Should I use event handler for attach value checking?
Such as blur, change...


You could use the button click event handler.{
    'click #myCoolBtn': function() {


Excuse me, I want to use event on it too

'change #myText': function() {
        alert('My text is attached value');


Seems like onchange would be the best bet. What results are you getting
from your experiments?


lets imagine that you have

<template name='myTemplate'>
	<input type='text' name='myinput'/>
	<button name='mybutton'> Attach value and handler </button>
    'click [name=mybutton]': function(evt, tmpl) {
    	var inputEl = tmpl.find('input[name=myinput]');
    	if !inputEl return;

    	inputEl.value = 'this is tje value for input'; = 'watch';

    'input input[data-watch]': function(evt, tmpl) {
    	var inputValueIs =;


Look great I will try.
Thanks a lot.