Well, I wasn't 100% sure I needed it, but it was the only part of the request not being emulated. Anyway, I used your suggestion of doing it just in HTML, and it seems to work. I was logged in anyway.
Still have to work on processing the returned data, and making the button styled like GWT, but apart from that great. Cheers for your help! :) On Jan 28, 4:04 pm, Thomas Broyer <t.bro...@gmail.com> wrote: > On Jan 28, 12:32 pm, darkflame <darkfl...@gmail.com> wrote: > > > > > I'm trying to emulate a forms exact behavour in GWT. > > According to firebug, the form gives of the following parameters and > > values; > > > action = verify > > openid_submit = Login > > openid_url =https://www.google.com/accounts/o8/id (that one varies, > > obviously) > > openid_username = > > submit = 1 > > > However, I'm having a hard time sending that last value of when I > > emulate it in gwt. > > When I create a hidden field like thus; > > > Hidden openid_submitfield = new Hidden(); > > openid_submitfield.setName("submit"); > > openid_submitfield.setValue("1"); > > > Triggering the form cause's a ; > > > "a.submit is not a function" error. > > > This error *only* happens when theres a hidden field called "Submit". > > If I name it anything else, it works just fine. > > > Any ideas on the cause and possible workarounds? > > The cause is in "DOM 0", i.e. what browsers did a long time ago (was > it IE3? Netscape 3?), allowing you to access a form's field by name as > a property of the form element (given a my_form variable being a > FormElement, you could call my_form.openid_url as an equivalent to > my_form.elements.openid_url). Unfortunately, a field named "submit" > would "shadow" the form's submit() method. > > Possible workarounds: > 1. are you sure you *need* this submit=1 parameter? > 2. replace your call to form.submit() with a SubmitButton (just like > an <input type=submit> or <button type=submit> in plain old HTML) -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.