[Proto-Scripty] Re: Creating a Submit Button
Hi Tomaso, The submit is a input element. new Element('input', {'type' : 'submit'}) should work. Miguel Tommaso wrote: I am having a problem creating a submit button with prototype in IE. I use the following code: button = new Element('button', {'type' : 'submit'}); form.insert(button) unfortunately in IE if you make at button, and run the code new Element('button', {'type' : 'submit'}).type You always get button, not submit. Consequently none of my forms submit in explorer. Am i doing something wrong? Thanks in advance for the help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Creating a Submit Button
On Mar 6, 10:05 am, Michael Hauptmann mhauptm...@gmail.com wrote: Hi Tomaso, The submit is a input element. new Element('input', {'type' : 'submit'}) should work. Miguel Hang on, Miguel HTML has both input type='submit' and button type='submit', so Tommaso's expectation is reasonable. Flanagan (the O'Reilly Javascript, The Definitive Guide) does not discuss the 'Button' object in the reference section, but refers the reader to the 'Input' object: I took that at first to mean that JS doesn't implement a 'Button' object separate from the 'Input' object, but that can't be right: all the DOM reference sites certainly list HTMLButtonObject as an interface. So, I don't know what is going wrong, but I don't see why it shouldn't work. In the meantime, using an 'input' object might be easiest :-) Colin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---
[Proto-Scripty] Re: Creating a Submit Button
Hi Colin, I wasn't aware about these details, but the last time I had this problem I could solve it by using an input element :-) As many times... this problem finally is an IE issue, it's not about standards :-) Regards, Miguel ColinFine wrote: On Mar 6, 10:05 am, Michael Hauptmannmhauptm...@gmail.com wrote: Hi Tomaso, The submit is a input element. new Element('input', {'type' : 'submit'}) should work. Miguel Hang on, Miguel HTML has bothinput type='submit' andbutton type='submit', so Tommaso's expectation is reasonable. Flanagan (the O'Reilly Javascript, The Definitive Guide) does not discuss the 'Button' object in the reference section, but refers the reader to the 'Input' object: I took that at first to mean that JS doesn't implement a 'Button' object separate from the 'Input' object, but that can't be right: all the DOM reference sites certainly list HTMLButtonObject as an interface. So, I don't know what is going wrong, but I don't see why it shouldn't work. In the meantime, using an 'input' object might be easiest :-) Colin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Prototype script.aculo.us group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~--~~~~--~~--~--~---