[jQuery] Re: Struts2, JQuery and JSON result to create a dynamic ajax website

2009-07-21 Thread genive...@gmail.com

Hi GF

This is really good!

Thank you very much!

On Jul 13, 3:52 am, GF gan...@gmail.com wrote:
 Hello all,
 i wrote a simple guide that explains how to use together Struts2 and
 JQuery to create dynamic content with Ajax and JSON.

 http://www.zulutown.com/blog/2009/07/12/ajax-dynamic-content-with-str...

 I hope someone can appreciate it

 Thank You


[jQuery] A beginner's problem

2009-05-16 Thread genive...@gmail.com

Hi All,

I'm a new comer to this forums and also jQuery.

There is this problem that I encountered while practicing with jQuery.

jQuery Script
$(document).ready(function(){

   $(#formDiv :button).click(
 function(){
var id = $(#userId).val()
var name = $(#name).val()
addRow(id, name)
 }
   );

   var addRow = function(id, name){
  $(tr +
td+id+/td +
td+name+/td +
td align=center +
input type=checkbox +
/td).insertAfter($(#atable tbody))
   };

   $(#atable :checkbox).attr(checked, false);

   $(#atable thead :checkbox).click(
 function(){
alert(checkbox in thead)
 }
   );

   $(#atable tbody :checkbox).click(
 function(){
alert(checkbox in tbody)
 }
   );
});//end ready


HTML
html
head
titlejQuery Example/title
  script type=text/javascript src=lib\jquery
\jquery-1.3.2.min.js/script
  script type=text/javascript src=script.js/script
/head
body

   div id=formDiv
  User ID: input type=text id=userIdbr/
  Name: input type=text id=namebr/
  input type=button value=Add Row
   /divbr/br/


div
table id=atable width=500px border=1 cellspacing=1
   thead
  thUser ID/th
thName/th
th
   input type=checkbox
/th
   /thead
 tbody

 /tbody
/table
   /div

/body
/html


The problem I'm having is, the alert does not fire whenever the
checkboxes in the tbody are clicked.

Hopefully I can find some help here.

Thanks in advance.
Alvin