Michael, The example works for me - what's the problem?
rob. On 4/19/07, Michael Schwarz [MVP] <[EMAIL PROTECTED]> wrote:
Hi, I have a very simple page which will be refreshed from time to time. I build an example which will be called every 1000 msec to redner a html table with a button inside. The button click event is set with the bind method. What I'm doing wrong? Regards, Michael <div id="display"> </div> <script type="text/javascript"> function clickhandler() { alert("clicked"); } function render() { var d = new Date(); var n = d.getTime(); $("button").unbind("click", clickhandler); var sb = []; sb.push("<table>"); for(var i=0; i<100; i++) { sb.push("<tr><td>" + i + "</td><td>" + n + "</td><td><button>Click</ button></td></tr>"); } sb.push("</table>"); $("#display").html(sb.join('')); $("button").bind("click", clickhandler); setTimeout(render, 1000); } $(window).ready(render); </script>
-- Rob Desbois Eml: [EMAIL PROTECTED] Tel: 01452 760631 Mob: 07946 705987 "There's a whale there's a whale there's a whale fish" he cried, and the whale was in full view. ...Then ooh welcome. Ahhh. Ooh mug welcome.