+ Start a Discussion

How to set window size for S-Control invoked thru URLFOR

I have a custom link that opens an S-Control in a new window using URLFOR to pass it some arguments. I would like to set the window size while I'm at it. Currently, the custom link opens a larger window than I want. I currently have the S-Control resize itself. However, the user sees that resizing and I'd rather avoid that. I could easily pass it the window dimensions as arguments, if they exist and someone would tell us their names :smileywink:
You can't do that if the custom link has a behavior of URL. Instead, change the behavior to Execute JavaScript, and use a simple JavaScript:
Now, your S-Control will open with the desired width, height, and features, and will be compatible with all modern browsers.

~ sfdcfox ~



The Javascript window.open works, and I can pass parameters through URLFOR.