Using Document.get().getElementById() returns an element, but it has
no value:
Element el = Document.get().getElementById("username");
if (el != null)
GWT.log("element: "+el.getNodeValue(), null);
prints only "element: " in the console.
Right now I'm having bigger problems trying to do things by
http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecurityFAQ
--
When the logon is successful, I hide the logon RootPanel <div>, show
the application RootPanel <div>, and add my widget to the application
<div>. This works fine in Firefox and Safari, but in IE7, I get a
blank browser. The application <div> never shows.
Whoever wrote the LoginSecurityFAQ, it's time "TODO: Expand on this
section" on the auto-complete section. :)
On Sep 1, 5:06 pm, Jason Essington <[email protected]> wrote:
> how about Document.get().getElementById()?
>
> the DOM one is deprecated
>
> -jason
> On Sep 1, 2009, at 2:12 PM, Thad wrote:
>
>
>
> > Why does DOM.getElementById() return null while $doc.getElementById()
> > in a JNSI method return a value?
>
> > I'm trying to add a logon form to my welcom-file HTML (as mentioned in
> >http://code.google.com/p/google-web-toolkit-incubator/wiki/LoginSecur...)
> > .
> > The username looks like
> > <input class="gwt-TextBox" type="text" id="username" />, and is
> > <div>A. The invoking button is written in GWT so that it may call my
> > logon RPC. My application is loaded in <div>B.
>
> > In the button's ClickHandler, if I request
> > String name = DOM.getElementById("username").getNodeValue(), the
> > element is null, not found. However if I request tring name =
> > getUsername(); where getUsername() is
> > private native String getUsername() /*-{
> > return $doc.getElementById('username').value;
> > }-*/;
> > the value of the username field is returned.
>
> > Why is the document different from one to the other? Can I get the
> > username without JNSI?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" 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/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---