Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I need to open custom aspx page as modal dialog. I'm using UmbClientMgr.openModalWindow to do this but when I try to click on the button that is calling this function it throws me an error saying:
"Umbraco.Controls.ModalWindow is not a constructor." on line var m = new Umbraco.Controls.ModalWindow(); in UmbracoClientManager.js scipt file.
If anyone know how to make this to work please help.
I'm using umbraco 4.5.2.
Hey Mladen,
openModalWindow is just a static method, so you need to call it like so:
UmbClientMgr.openModalWindow('/your/url/goes/here', 'Window Name', true, 500, 480);
Matt
I call it like this
myBtn.Attributes.Add( "onclick", "UmbClientMgr.openModalWindow('mypage.aspx', 'some title', true, 800, 600);" );
Is this the right way to do it?
Hmmm, that should be fine.
Is your button housed in an Umbraco ensured page? Maybe some JS file has not been included on the page?
Well this are the js files that are included in the page
<script type="text/javascript" src="umbraco_client/Application/NamespaceManager.js">script><script type="text/javascript" src="umbraco_client/Application/UmbracoApplicationActions.js">script><script type="text/javascript" src="umbraco_client/Application/UmbracoUtils.js">script><script type="text/javascript" src="umbraco_client/Application/HistoryManager.js">script><script type="text/javascript" src="umbraco_client/Application/UmbracoClientManager.js">script>
Hmmm, have you tried adding a reference to the modal.js ?
\umbraco_client\modal\modal.js
Or maybe, if you are in an iframe, try and reference the "top" variable to use it as defined in the umbraco surround?
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Modal dialog
I need to open custom aspx page as modal dialog. I'm using UmbClientMgr.openModalWindow to do this but when I try to click on the button that is calling this function it throws me an error saying:
"Umbraco.Controls.ModalWindow is not a constructor." on line var m = new Umbraco.Controls.ModalWindow(); in UmbracoClientManager.js scipt file.
If anyone know how to make this to work please help.
I'm using umbraco 4.5.2.
Hey Mladen,
openModalWindow is just a static method, so you need to call it like so:
Matt
I call it like this
Is this the right way to do it?
Hmmm, that should be fine.
Is your button housed in an Umbraco ensured page? Maybe some JS file has not been included on the page?
Matt
Well this are the js files that are included in the page
Hmmm, have you tried adding a reference to the modal.js ?
Or maybe, if you are in an iframe, try and reference the "top" variable to use it as defined in the umbraco surround?
Matt
is working on a reply...