[Proto-Scripty] Re: observer ignored for submit buttons in IE 6?

2009-05-27 Thread T.J. Crowder
Hi, Is there a way for submit() to function with input name=submit type=submit / because that is so ingrained into the html and back end code that if I cannot I need to re approach a different way in javascript. The problem (as I'm sure you figured out) is that IE puts properties (well,

[Proto-Scripty] Re: observer ignored for submit buttons in IE 6?

2009-05-27 Thread ykaerflila
I added the line elm.up('form').submit(); after playing with this script in a simple test page I setup. I created a simple html document with just a form w/ 1 field and 2 submit buttons. In IE6 regardless the form will not submit if you remove the submit() line. disabling the submit button on

[Proto-Scripty] Re: observer ignored for submit buttons in IE 6?

2009-05-26 Thread ykaerflila
sorry its taken me so long to get back in here and reply but I've been fighting with my own ignorance heh. I got so caught up in the initial problem in here I forgot details about the extra logic I needed, to do exactly what I want when the buttons are clicked. I am disabling each and every

[Proto-Scripty] Re: observer ignored for submit buttons in IE 6?

2009-05-22 Thread T.J. Crowder
Hi, Your code works for me, using IE6. My suspicion is that there's an error elsewhere on the page that's preventing IE from hooking up the handlers. Or could it be a typo in the class name on the elements? Anyway, here's independent confirmation that the quoted code is not the problem. :-)

[Proto-Scripty] Re: observer ignored for submit buttons in IE 6?

2009-05-22 Thread Walter Lee Davis
This may be your problem with IE6. I have heard apocryphal comments that dom:loaded is currently broken (fixed in the latest edge version) in certain flavors of IE. See if switching to Event.observe(window,'load',... fixes things for you in this browser. If so, you will be saved by the

[Proto-Scripty] Re: observer ignored for submit buttons in IE 6?

2009-05-22 Thread Walter Lee Davis
You may find that you are using the same version on both sites, which means that my solution fixed the problem, but not for the reason I thought. There may be a timing/latency issue somewhere else in your code that is resolved by the DOM being completely settled (onload is very late in

[Proto-Scripty] Re: observer ignored for submit buttons in IE 6?

2009-05-22 Thread Walter Lee Davis
Can you try using Yahoo code style, and move your function outside of an observer altogether, and put it inside a script block just above the closing body tag? So if you have document.observe('dom:loaded', function(){ //magic here } Just move //magic here inside its own script

[Proto-Scripty] Re: observer ignored for submit buttons in IE 6?

2009-05-22 Thread Walter Lee Davis
Oh, hey, maybe you should use a different method altogether: document.observe('click',function(evt){ var elm = evt.element(); if (elm.tagName == 'A' || elm.hasClassName('processing')){ //magic here } } One observer for the whole page (or pick some DOM

[Proto-Scripty] Re: observer ignored for submit buttons in IE 6?

2009-05-22 Thread ykaerflila
Both of these work beautifully. I'm partial to he last method as I can still include that in my .js file loaded in the head of the document. observing the whole page is what works. I tried observing the parent div with poor results but I am betting that is because I'm loading the script prior

[Proto-Scripty] Re: observer ignored for submit buttons in IE 6?

2009-05-22 Thread Walter Lee Davis
Okay, if you want to do that, then just wrap the parent.observe listener in a document.observe('dom:loaded') listener. The reason why you would want to observe the parent is because you don't want to go through this little dance on every last click on the entire page, only the ones where