diff --git a/dlls/mshtml/htmlevent.c b/dlls/mshtml/htmlevent.c
index c8dad46c059..9092b650079 100644
--- a/dlls/mshtml/htmlevent.c
+++ b/dlls/mshtml/htmlevent.c
@@ -107,6 +107,9 @@ static const WCHAR onresizeW[] = {'o','n','r','e','s','i','z','e',0};
static const WCHAR selectstartW[] = {'s','e','l','e','c','t','s','t','a','r','t',0};
static const WCHAR onselectstartW[] = {'o','n','s','e','l','e','c','t','s','t','a','r','t',0};
+static const WCHAR submitW[] = {'s','u','b','m','i','t',0};
+static const WCHAR onsubmitW[] = {'o','n','s','u','b','m','i','t',0};
+
static const WCHAR HTMLEventsW[] = {'H','T','M','L','E','v','e','n','t','s',0};
static const WCHAR KeyboardEventW[] = {'K','e','y','b','o','a','r','d','E','v','e','n','t',0};
static const WCHAR MouseEventW[] = {'M','o','u','s','e','E','v','e','n','t',0};
@@ -180,7 +183,9 @@ static const event_info_t event_info[] = {
{resizeW, onresizeW, EVENTT_NONE, DISPID_EVMETH_ONRESIZE,
EVENT_DEFAULTLISTENER|EVENT_BUBBLE},
{selectstartW, onselectstartW, EVENTT_MOUSE, DISPID_EVMETH_ONSELECTSTART,
- 0}
+ 0},
+ {submitW, onsubmitW, EVENTT_HTML, DISPID_EVMETH_ONSUBMIT,
+ EVENT_DEFAULTLISTENER|EVENT_BUBBLE}
};
static const eventid_t node_handled_list[] = { EVENTID_LOAD };
diff --git a/dlls/mshtml/htmlevent.h b/dlls/mshtml/htmlevent.h
index 608950479bb..a1b3c744068 100644
--- a/dlls/mshtml/htmlevent.h
+++ b/dlls/mshtml/htmlevent.h
@@ -38,6 +38,7 @@ typedef enum {
EVENTID_READYSTATECHANGE,
EVENTID_RESIZE,
EVENTID_SELECTSTART,
+ EVENTID_SUBMIT,
EVENTID_LAST
} eventid_t;
diff --git a/dlls/mshtml/htmlform.c b/dlls/mshtml/htmlform.c
index 3dff3766f84..0f77d28cb14 100644
--- a/dlls/mshtml/htmlform.c
+++ b/dlls/mshtml/htmlform.c
@@ -28,6 +28,7 @@
#include "wine/debug.h"
#include "mshtml_private.h"
+#include "htmlevent.h"
WINE_DEFAULT_DEBUG_CHANNEL(mshtml);
@@ -323,15 +324,19 @@ static HRESULT WINAPI HTMLFormElement_get_name(IHTMLFormElement *iface, BSTR *p)
static HRESULT WINAPI HTMLFormElement_put_onsubmit(IHTMLFormElement *iface, VARIANT v)
{
HTMLFormElement *This = impl_from_IHTMLFormElement(iface);
- FIXME("(%p)->(v)\n", This);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%s)\n", This, debugstr_variant(&v));
+
+ return set_node_event(&This->element.node, EVENTID_SUBMIT, &v);
}
static HRESULT WINAPI HTMLFormElement_get_onsubmit(IHTMLFormElement *iface, VARIANT *p)
{
HTMLFormElement *This = impl_from_IHTMLFormElement(iface);
- FIXME("(%p)->(%p)\n", This, p);
- return E_NOTIMPL;
+
+ TRACE("(%p)->(%p)\n", This, p);
+
+ return get_node_event(&This->element.node, EVENTID_SUBMIT, p);
}
static HRESULT WINAPI HTMLFormElement_put_onreset(IHTMLFormElement *iface, VARIANT v)