What you were doing in 2009 was basically a hack (it was never documented, as far as I know, in the official documentation), because the Custom URL was used directly in a Javascript call to open a new window, basically by adding commas to your string you are specifying more parameters. Your example is adding a width and height and a window name to make the string fit correctly in the call.
This was not supported and shouldn't ever have worked (no proper input checking was done on this parameter), it is basically almost as bad as allowing SQL injection or those kind of hacks.
So you have noticed that as of 2011, a better mechanism is used to open the Custom URL window, which also does not allow this type of hacks anymore. But there is a very easy way to set the correct window size, using window.resizeTo(width, height)
<html>
<head>
<title>my custom url page</title>
<script type="text/javascript" language="javascript" src="/WebUI/Core/Controls/Popup/PopupInit.js"></script>
<script>
function init()
{
window.resizeTo(500, 500);
}
</script>
</head>
<body onload="init();">
<!-- my custom url page -->
</body>
</html>
By the way when using an ASP or ASPX page, make sure you don't refresh, reload or post inside the page, as that will clear the window.dialogArguments
parameter so you cannot access the Component window that opened your popup anymore. In that case you should really use an iframe
like I do in my Item Selector Custom URL example.
update
Reading your question again, I'll add an update to my answer. You indicate you don't want to control it inside the Custom URL page, but from the custom URL. Really as of 2011 the only way to control the size of the popup window is by using window.resizeTo(width, height)
, but that doesn't mean you cannot build something that would allow you to specify the size anymore. Just specify the width and height as URL parameters and read them using Javascript, something like this should work (with your Custom URL /path/mypage.html?width=950&height=600
):
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\\[").replace(/[\]]/, "\\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"), results = regex.exec(location.search);
return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
function init()
{
var width = getParameterByName("width");
var height = getParameterByName("height");
if (width != "" && height != "")
{
window.resizeTo(width, height);
}
}