CGridView ajax update causes trouble in IE-7

Client Environment:

IE-7 or earlier.

(I don’t have a real IE-7. I tested with IE-Tester and IE-7 mode of IE-9)

Windows Vista 64-bit.


After the grid is updated by ajax, click on an ajax link in the grid will open a new window for the specified url.

How to reproduce:

  1. Let gii generate some admin page.

  2. Add 3 or 4 items.

  3. Click "delete" button on one row.

  4. Click "delete" button on another row.


You may notice nothing strange in the 3rd phase.

In the 4th phase, the original page behaves as expected, but another window will open for the link.

On-click event is processed as expected, but the opening of a new window happens before the event reaches the handler, so the call to “event.preventDefault()” doesn’t help in this.

I don’t call it a BUG either in Yii or in jQuery. I really hate IE-7’s weird script engine.

In short, jQuery.on() seems not working as expected in IE-7 … :(


Use ‘afterAjaxUpdate’ function, in which you first call to remove event handlers, and then call jquery.on() to re-attach event handlers.


You can move this topic to another forum.

I don’t think it’s an issue that Yii developers should give their time. :)

Yes There Issue in IE7 Using JQuery But Before Just Check JQuery Conflict ion not There ?

These Issue We have Faced And Solved It .plz check J query Inclusion code

Thank you for your reply, shailesh. :)

I’ve made sure that the page load jQuery just once, only in the initial load.