IWEventRegistry.addFormHandler("onFormInit", init);//--------------------------------------------------------------------------------function init(){ if (parent.datacapture.isDatacaptureLoaded) { custom_init(); } else { setTimeout("init()", 500); }}//--------------------------------------------------------------------------------function custom_init(){ alert("Loaded");}
I am hoping this is a typo://hostname/default/main/map/WORKAREA/scripts/map_dcr.jsand it should be something like://hostname/default/main/map/WORKAREA/shared/scripts/map_dcr.jsIt should be ../../../scripts/map_dcr.jsDo you have an event to trigger init ? Something like onFormLoad....It may be that when it tries to run init(), the form is not loaded yet.
Oh ok. Then that is what I need. I was trying to access the js file from the other WA which is an issue in 7.2.1. Can anyone else confirm the fact please?Nipper,When I reference the JS file from the same WA with ../../../ in DCT as you suggessted, it worked. Thanks!
I am sorry but is a bone-headed design. Workareas should not be used in such a manner. I know there is nothing you can do about it. I always use location=webserver and then put the files in iwhome/httpd/iw/someFormAPIThe user iwui may not have access to that workarea.
Nipper,Thanks for the suggesstion. Let me see if we can have the setup changed.
Nipper,Thanks for the suggesstion. Let me see if we can have the setup changed. Taalgaard,There are thousands in DCTs. Also, we should account for the JS file references inside each and every DCT Thanks!
I'm not following, what are you planning on changing?
Thousands of DCTs ? The most I have every build was around 100. Certainly thousands of DCRs. If this is a Unix system, get on the command line and su to the iwui user and try to traverse to the workarea in question.