Why can't the user be allowed to decide what the submit id and
attribute name is ? Or am I missing something obvious ?

I think the first thing I did with ToscaWidgets was kluge in a
mechanism to do this.

Cheers,
Robin

On Feb 8, 12:06 pm, Alberto Valverde <[EMAIL PROTECTED]> wrote:
> On Feb 7, 2007, at 6:07 PM, Daniel Haus wrote:
>
>
>
>
>
> > Ok, here's another one.
>
> > ToscaWidgets' Forms always come with an <input type="submit"/>, which
> > always obviously has a hardcoded id="submit". Now here's my problem: I
> > need to submit the form via javascript and the button's id overwrites
> > the form's submit()-method (at least in Firefox and Safari).
>
> > In expression, I get:
> >    typeof(document.forms[0].submit) == 'object'
> > but it should be:
> >    typeof(document.forms[0].submit) == 'function'
>
> > Ok, an easy solution would be to subclass my own form and simply
> > change or remove the id or the button completely. On the other hand,
> > could I have overlooked some feature to change the id of the submit-
> > button? If not, I really think it's bad practice and might cause
> > unnecessary headaches to (at least not so experienced) javascripters.
>
> Hmm, being a javascript noob I wasn't aware of this... sounds
> reasonable to avoid the id attribute on the submit button's markup
> then. I'll comitt a fix soon (would you mind opening a ticket at TG's
> trac so I don't forget?)
>
> thanks for pointing it out :)
>
> Alberto


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to