RE: IE AJAX Focus Stuff (maybe a little off topic)
> -Original Message- > From: David Legg [mailto:[EMAIL PROTECTED] > > I can't stand seeing a grown man cry ;-) So I thought I'd > chip in with some ideas. I'm 13. Just kidding. I've got somewhere though. IE is messed up, but we knew that anyway. The three laws of IE6 AJAX in CForms appear to be: 1, If you are altering the DOM of the form item you are about to tab into then it will trigger the bug. 2, If you are moving to a selection list from an item that has just been altered then you trigger the bug. 3, If IE can cause you pain and grief then it will do. I tested this without using tabindex (which worked ok). Really just selection lists as well though they may be others but dull old input fields work fine. Right I feel I've lost enough sanity on that for now but I might see if I can find anything of note later. Thanks, Gary * The information contained in this message may be confidential or legally privileged and is intended for the addressee only. If you have received this message in error or there are any problems please notify the originator immediately. The unauthorised use, disclosure, copying or alteration of this message is strictly forbidden. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: IE AJAX Focus Stuff (maybe a little off topic)
Hi Gary, Replying to my own messages. Sad ;). I can't stand seeing a grown man cry ;-) So I thought I'd chip in with some ideas. Looking at the Microsoft documentation ( http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/focus.asp ) it would seem that an item's focus cannot be set until the document has fully loaded. Further more it will only work if the tabindex attribute is set. From my cursory look it would seem the general consensus is this is a documented bug. This may explain why your fix only worked after you put a debug alert() box on screen. - David. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: IE AJAX Focus Stuff (maybe a little off topic)
I wrote: > I was thinking of maybe adding a function to set the focus of > the element after the update has been done but this might > present problems in itself. Just looking for any ideas or > suggestions but I shall take a look at the source (obviously > if I find a solution I will post the fix to save someone else > the headache). Looks like the 2.1.9 source I should be > looking at is ajax/cocoon.js though as my production system > is currently using 2.1.8 (I was having some problems with > DOJO) then I think I should be looking at > org/apache/cocoon/ajax/resources/js/cocoon-ajax.js from the > ajax block. Replying to my own messages. Sad ;). Anyway I played around with the cocoon-ajax.js script and couldn't fix the problem. The main thing I was trying was to do was update cocoon.ajax.BrowserUpdater.prototype.processResponse = function(doc, request) so it got the active element at the beginning of the it's changes and attempted to set the focus back to the same element after the changes had been performed. Didn't seem to work though, unless you put a debug alert() message before every focus where it worked fine (grrr...). Ah well I might remove the offending on-change handlers for now and try and fix it again later (maybe we'll have migrated to a real browser, I can live in hope). If you do have any suggestions I'd love to hear then though. Gary PS: Should this be on the developers list? * The information contained in this message may be confidential or legally privileged and is intended for the addressee only. If you have received this message in error or there are any problems please notify the originator immediately. The unauthorised use, disclosure, copying or alteration of this message is strictly forbidden. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
IE AJAX Focus Stuff (maybe a little off topic)
There has been a bug that has been plaguing me for a while. Though given it only happens in IE (6.0) and not Firefox I'm not really sure it is the fault of the Cocoon AJAX library but I thought I'd see if any of you have suggestions on scripts that I could play with to maybe fix it. If you are tabbing through a form with AJAX enabled and the system performs an AJAX request which updates the DOM tree then IE seems to lose the current place of the tabs and sticks you back at the top of the page. It isn't so bad for me (as I'm just the developer) but infuriating for my users who fill in the forms all the time. I'd love to be able to say "try using a browser that actually works" but unfortunately I'm not in that position. You can see it in the samples/blocks/forms/do-multipage.flow example (in 2.1.9). On the second page when are asked to "Please enter a number (will automatically set a correct value below if needed): " if you enter a number and hit Tab in IE then it will jump back to the top where you'll have to tab back through to the item again. This is, presumably, because it updates the tree and IE gets confused and loses it's position. I was thinking of maybe adding a function to set the focus of the element after the update has been done but this might present problems in itself. Just looking for any ideas or suggestions but I shall take a look at the source (obviously if I find a solution I will post the fix to save someone else the headache). Looks like the 2.1.9 source I should be looking at is ajax/cocoon.js though as my production system is currently using 2.1.8 (I was having some problems with DOJO) then I think I should be looking at org/apache/cocoon/ajax/resources/js/cocoon-ajax.js from the ajax block. Thanks for any help you might be able to provide for this issue, Gary * The information contained in this message may be confidential or legally privileged and is intended for the addressee only. If you have received this message in error or there are any problems please notify the originator immediately. The unauthorised use, disclosure, copying or alteration of this message is strictly forbidden. * - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]