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)
IWDatacapture.close - Throws error
Jenni
Hi All,
I a trying to close the DCT window , once the JS section is executed and it is throwing error as.
Object doesn't support this property or method
DCT code,
IWDatacapture.close(true);
Any pointers on this? If i specify as false, there is no error and still the DCT window remains open.
Thanks!
TS 6.5 SP2
Windows 2003
Find more posts tagged with
Comments
jbonifaci
true or false simply determines whether the user is prompted to save or regenerate before closing.
Are you opening the form normally? I'm guessing not, as you have posted recently about trying to open the form in a separate frame. Because of this, I don't think you'll be able to use IWDatacapture.close(), as you can't "close" a frame, you can only close a window.
That being said, posting the exact error message and the code where the error is taking place would be beneficial.
~Jeff
Jenni
Hi Jeff,
Here is my code. If you look into the init function, the first statement is to close the window.
Thanks!
[html]
<script language="javascript" location="template-type" src="../common.js"/>
<script>
<br> IWEventRegistry.addItemHandler("/root/QuickPollRight", "onCallout", lookup);<br> function selectType()<br> { <br> contentType = "MembersDefault";<br> return true;<br> }<br>
</script>
UCAHiddenValue3
<script language="javascript">
<br><br> function init()<br> {<br> IWDatacapture.close(true);<br> <br> var path = IWDatacapture.getDCTPath();<br> <br> <br> //alert(path);<br> alert('About to enter the function');<br> <br> var params = new Object();<br><br><br> var URL = "
http://localhost:81/TestCMSFlexWebSite/NewDefault.aspx
" + '?path=' + path; <br> <br> <br> <br> return false;<br><br> <br> }<br> <br> <br> <br> function test(DCRPath, tplPath)<br> {<br> <br> alert(DCRPath);alert(tplPath);<br> <br> var params = new Object();<br> params.test = tplPath;<br> params.dcrPth = DCRPath;<br> params.tplPath = tplPath;<br> IWDatacapture.callServer("/iw-bin/gen.ipl", params, true); <br> <br> } <br> <br> <br> <br> init();<br>
</script>
[/html]
jbonifaci
First, a few quick comments:
1) You have an addItemHandler that should be in your init.
2) Your init function be called onFormInit, not just "init()":
IWEventRegistry.addFormHandler('onFormInit', init);
As far as why your close isn't working, I'm not sure why it doesn't work with true. Changing it to false I can get it to work if I add a return after the close command or remove the alert after the close. It seems that it doesn't like having an alert after the close.
~Jeff
Jenni
Jeff,
Thanks for the response. I added addformhandler. Removed all the code from the function except for the code,
IWDatacapture.close(true); return false;
I am still unable to get the CLOSE function working.
Here is the new error.
An error has occured in the dialog
Error: 84
Unspecified error
Thanks!
Jenni
Hey Jeff,
You are right, if IWdatacapture.close is the last statement, it works. Thanks for the pointer.
Thanks!
Jenni