Actually, I ran into this problem too[1], after debugging with alerts inside prototype, I've discovered that the ajax helper is really generating the same IDs. I've ended up with my own IDs, but this seems like a ticket material, rand() should definitely be replaced with mt_rand() to solve the problem permanently.
Also, I'm not sure if this is platform related, it happened to me on several Windoze and Linux machines. [1] http://groups.google.com/group/cake-php/browse_thread/thread/64c39fce5097e10b?hl=xx-bork# On Jun 16, 12:00 am, schneimi <[EMAIL PROTECTED]> wrote: > Thx alot for your answer, srand() in beforeRender really solves the > problem! :-) > > I think I will try out if the problem also happens on another system > and write a ticket if it does. > > francky06l schrieb: > > > I suppose, you can also give an id on the ajax link by passing id => > > 'myid' in the options array. > > Anyway, this is a problem if the rand() gives the same number (linked > > to php version or plateform ?). > > Maybe issuing an srand() or mt_srand() in beforeRender() would avoid > > such collision .. > > hth > > > On Jun 15, 5:10 pm, schneimi <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > my site is working with tabs, so different views are present on one > > > page at the same time, but only one is visible. > > > > Now I have the problem, that sometimes after working in different > > > tabs, some sorting- and pagination-ajax-links stop working in the > > > views, nothing happens on click anymore. > > > > I tracked the problem down to the ajax-links having same IDs in > > > different tabs. I am not sure how this can be, each view is rendered > > > by a different controller. For the sorting links I could set an ID > > > manually, but the IDs for pagination-links coming with numbers() are > > > given inside the paginator-helper. > > > > Is this a bug, or is there something I can do to avoid that problem? > > > > For now I edited the ajaxhelper to not just give a random ID for the > > > links, but also place the calling controller/action within the ID to > > > make it more unique, but I would really like not to have to edit it. > > > > (I am using cakePHP 1.2.0.6311 beta) > > > > Greetings, > > > Michael --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~----------~----~----~----~------~----~------~--~---