Here is my  entry point

package test.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.dom.client.Document;
import com.google.gwt.user.client.ui.FormPanel;

public class Test_gwt_form implements EntryPoint {

        public void onModuleLoad() {
                FormPanel form = FormPanel.wrap(Document.get().getElementById(
                                "testForm"));
                form.addSubmitHandler(new FormPanel.SubmitHandler() {
                        public void onSubmit(FormPanel.SubmitEvent event) {
                                event.cancel();
                        }
                });
        }
}

Here my html

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link type="text/css" rel="stylesheet" href="Test_gwt_form.css">
<title>Test Project</title>
<script type="text/javascript" language="javascript"
src="test_gwt_form/test_gwt_form.nocache.js"></script>
</head>
<body>
<h1>Test Project</h1>
<form id="testForm" action="/test"><input type="text" /> <input
type="submit" /></form>
</body>
</html>

Form submits anyway :(


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to