Hi all,
This is my First time using DOM Class...

I try to set Event.ONCLICK from DOM class, it just work fine in IE6
but FF doen't work...
I still searching about this issue, but nothing work for me.
 Let me show you...

My Module.html content:
--------------- HTML -------------

<html>
        <head>
                <style>
                        body,td,a,div,.p{font-family:arial,sans-serif}
                        div,td{color:#000000}
                        a:link,.w,.w a:link{color:#0000cc}
                        a:visited{color:#551a8b}
                        a:active{color:#ff0000}
                </style>

                <!--                                           -->
                <!-- This script loads your compiled module.   -->
                <!-- If you add any GWT meta tags, they must   -->
                <!-- be added before this line.                -->
                <!--                                           -->
        </head>

        <!--                                           -->
        <!-- The body can have arbitrary html, or      -->
        <!-- you can leave the body empty if you want  -->
        <!-- to create a completely dynamic ui         -->
        <!--                                           -->
        <body id="xPanel">
                <!-- OPTIONAL: include this if you want history support -->
                <iframe src="javascript:''" id="__gwt_historyFrame" 
style="width:
0;height:0;border:0"></iframe>
                <script type="text/javascript" language="javascript"
src="com.dkcontrol.site.Customers.AjaxLogin.nocache.js"></script>
                <table width="100%" border="0">
                  <tr>
                    <td width="200"></td>
                    <td>
                    --- HERE IS THE TARGET
                    <div id="LABEL_ERROR"></div>
                    <input id="FIELD_EMAIL" type="text">
                    <input type="password" id="FIELD_PASS" value="12345678" >
                                <input type="button" id="BUTTON_SUBMIT"/>
            </td>
                    <td width="200">&nbsp;</td>
              </tr>
    </table>
        </body>
</html>

----- My GWT code --------

public class AjaxLogin implements EntryPoint {
        public Element FIELD_EMAIL;
        public Element FIELD_PASS;
        public Element BUTTON_SUBMIT;
        public Element LABEL_ERROR;
        public void onModuleLoad() {


            FIELD_EMAIL = DOM.getElementById("FIELD_EMAIL");
            FIELD_PASS = DOM.getElementById("FIELD_PASS");
            BUTTON_SUBMIT = DOM.getElementById("BUTTON_SUBMIT");
            LABEL_ERROR = DOM.getElementById("LABEL_ERROR");

            DOM.setEventListener(BUTTON_SUBMIT, new EventListener(){
                        public void onBrowserEvent(Event event) {

                                if (DOM.eventGetType(event) == Event.ONCLICK) {
                                        LABEL_ERROR.setInnerHTML("ERROR");
                    }
                        }
            });
            DOM.sinkEvents(BUTTON_SUBMIT, Event.ONCLICK) ;


        }
}

When i did click on IE6, works perfect but FF and Chrome doesn't
work..

What is wrong here ?

Thanks...
--~--~---------~--~----~------------~-------~--~----~
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-Toolkit@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to