Why my Request was more and more

hello;
I have a datagrid,when I selected one row,I got some info with the rows’id,but,when I 1st secleted,it’s send one Request,the 2nd,it’s send 2 Requests,and 3rd, it’s send 3 Requests,

then,mysql wsa say:“too many connection”

How can I do.

I got the cause.

my code:mypop.attachEvent(“onShow”, function() {
myGrid.clearAndLoad(“myAction.do?paramId=” + id,
doAfterRefresh, “xml”);
}
this is wrong.

the right:mypop.attachEvent(“onShow”, function() {
myGridClearAndloadById(id);
}
function myGridClearAndloadById(id){
myGrid.clearAndLoad(“myAction.do?paramId=” + id,
doAfterRefresh, “xml”);
}