Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Error when DCT is loaded for the first time
AKB
Hi,
My DCT has some formAPI code and also it calls formAPI script. Whenever the DCT is loaded for the first time I get the following error
"Runtime Error has occurred do you wish to Debug"?
Line 1
Error Syntax Error.
Once I click refresh, I do not get the error. Later if I again try to create New DCR there is no error. If I remove all the cache, I do get the error for the first time and then later it works fine.
Wanted to know if anyone has seen such issue.
Thanks
Find more posts tagged with
Comments
Johnny
are you doing anything funky with your javascript like trying to access variables on another frame?..?
Post your DCT/js , maybe someone will spot something.
John Cuiuli
AKB
I am attaching the DCT, js file and the server program. The code is at development state so there are lots of debugging statements...
Sri
Hi,
It seems like you are using quite a bit of javascript in FormAPI. It is very likely that your formapi code is causing the javascript error. I haven't figured out why the problem is occurring yet, but here are few suggestions for you to debug this:
* Start with a really simple FormAPI script. Make sure it works. Then proceed by adding new event handlers and related code. Do it in a step by step process.
* Use browser supplied javascript debugger. My favorite is Mozilla's javascript console. But it seems like you have javascript that is specific to Internet Explorer. So, install javasript debugger for IE (available from MSDN) if you have not already got one. Don't forget to enable javascript debugging in IE (Tools -> Internet Options -> Advanced..)
Hope this get you started in figuring out the problem.
Sri
AKB
The funny thing is. Even when I remove all the code from the js file(make the file empty). I get the error. As said before I get this error only when we do File-
-->Create New DCR for the first time after the system has been rebooted. After that it works fine.
If I remove the script part from the DCT. That is calling the js script and also the SaveDone and onSaveNameSpecified (no formpapi code overall) then the error is not there.
If I just keep the src="/properties/getNavitemsTest.js under the script tag I do get the error
help/comments will be greatly appreciated
Thanks
AKB
Hi,
when I change the path to "/iw/cci/meta/ni-np/iw-mount/default/main/intranets/oit_original/WORKAREA/wa/properties/getNavitemsTest.js" from
/properties/getNavitemsTest.js in the DCT to load the js file there is no error. I do not get the syntax error when the DCT is loaded for the first time after reboot...
Any thoughts on this..
Sri
Hi,
From the datacapture dtd,
<!ELEMENT script (#PCDATA)>
<!ATTLIST script
language CDATA "javascript"
location (webserver|template-type) "webserver"
src CDATA #IMPLIED
>
When there is a script tag with no location attribute (such as <script src="/properties/****"/> ), FormAPI tries to load it from webserver. It looks like your script is in a WORKAREA. So, you need to set the location attribute to "template-type" and place the script file in the appropriate data type directory. When this form is loaded, formapi is smart to append the path specified in "src" attribute to current workarea path and fetch the script.
Hope this helps,
Sri
AKB
Thanks a lot sri for the mail. But then why does it work all other time and does not work only for the first time. If i create 10 new DCR in a day, I get the error only for the first time and and then no issues. Everything runs fine..
Anyways I will change and try template type.
Drew_The_Goat
Hi AKB,
We found this error appearing on IE 5.5 clients after a Windows 2k/ IE 5.5 security patch. Turns out, the security patch made all the DCTs with FormAPI have that javascript error- we also commented out all the code and found just the <script></script> tags to cause it too.
A few months ago, Interwoven sent out some kind of notice saying they would not be supporting TS browser functionality to a Windows OS security patch, and we determined at that time that the patch caused this behavior.
The solution was to upgrade the IE browsers to 6.0, the error stopped appeared on those clients.
Good luck,
Drew