RE: IE AJAX Focus Stuff (maybe a little off topic)

2006-11-13 Thread Stewart, Gary

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]



Re: IE AJAX Focus Stuff (maybe a little off topic)

2006-11-13 Thread David Legg

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)

2006-11-13 Thread Stewart, Gary


 -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]