Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
FormAPI: trying to register an event
System
Does anyone know why the following piece of code doesn't work? The before-alertbox is popped up, the after one isn't. So clearly the FormAPI in between is not correct. Although it comes straight from the examples provided by interwoven.
alert("before");
IWEventRegistry.addHandler("onSaveDone", saveDone);
alert("after");
I also tried with other events (onSaveValid etc)
Find more posts tagged with
Comments
Gregg Faus
Have you created the actual event handler function "saveDone"? The first alert should fire just fine, but the second doesn't because of an undefined object (saveDone).
Migrateduser
Yes I have created this function.
But it's not at the time the event fires that the error occurs. It's already when trying to declare that the browser should listen to this event....
Migrateduser
Try
IWEventRegistry.addFormHandler("onSaveDone", saveDone);
(use addFormHandler)
Migrateduser
Thanks for your reply.
I had already discovered this, that was indeed the problem. Apparently the html-documentation is wrong, in the API reference the function is correct.