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)
edit DCR with onFormInit
mifouane
(see attached file for DCT code and CGI script) I am editing a field in a DCR using “IWEventRegistry.addFormHandler("onFormInit", init);”. The init function calls a CGI script that returns a value to be included in the field. It also returns some javascript that calls the “quiz_number” function, which sets the value of the field and then sets it to readonly. The script works, the correct value is set and then becomes readonly. The problem is that the form will not save. I get the following javascript error: “Object doesn’t support this property or method”. I have done some debugging and the line that seems to be causing the problem is the following: IWDatacapture.getItem("/body/quiz_number").setValue(last_insert+1);
This works when a save a DCR that was previously created (before I had the onFormInit) but it does not work when I use “Save As”.
I also get the following pop-up error when using “Save As” although I believe this is another problem since it pops-up even if I don’t include the onFormInit: Command null not found in the command descriptors.
I am using TS 6.1.
Thanks for any help you can give me!
Find more posts tagged with
Comments
There are no comments yet