[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 a

[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 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, property-like

[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 inp

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

2009-05-23 Thread T.J. Crowder
Hi, > This does bring into question in my mind the order of onclick vs. > forum submission. right now the 2 buttons i've been testing this with FWIW, I think the question you have to ask is why you're seeing this behavior but I'm not, and moreover, I haven't heard of it either -- this suggests

[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 it

[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 to

[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 elem

[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 block

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

2009-05-22 Thread ykaerflila
well its not a version issue. I just copied the js files from to another to confirm and the issue still persists with dom:loaded as far as timing goes the submit buttons I'm observing for clicks are static HTML elements. I had been assuming all static HTML is loaded upon dom:load (but admittedly

[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 th

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

2009-05-22 Thread ykaerflila
@T.J Crowder Thanks for the confirmation I was assuming that something silly I should have seen was giving me grief, and for the tip .invoke looks a lot better so I've changed my code. @Walter Lee Davis, That worked like a champ. I changed document.observe("dom:loaded", code.launch ); to Eve

[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 Prot

[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. :-) B