You need to sign in to do that
Don't have an account?
aruna11.3081223889641084E12
How to customize the size of window for opening Visualforce page?
Hi,
I need to open a visualforce page from the formula link...
So, in hyperlink function i have set the url for opeing that VF page.
Just the simple hyperlink formula:
HYPERLINK("/apex/TestPage", Email)
Now, i want t open this "Testpage" in new window with fixed height and width.
From standard config setting for the detail page button, i am able to provide height and width for the new window.
But how to provide height and width through this formula field?
Please help!!
Hey Guys,
Finally comes the solution for the same:
I have used formula field to redirect to VF page and setting the height and width while loading the window as below:
Formula field:
HYPERLINK("/apex/TestPage", Email)
VF resized window script:
<html>
<head>
</head>
<body onload="moveTo(0,0); resizeTo(400,300);">
hello
</body>
</html>
This is the required solution and finally got it...
Yippppppppeeeeeee.. :)
All Answers
I don't think you'll be able to do this. The HYPERLINK function generates a URL, but you can't set size information via a URL, you need to use javascript instead.
Thanks for the reply Bob.
Yes, we cannot set width and height of the window in Hyperlink function.
The other way is to use window.open function, but not sure how to use this in formula with the window height and width attributes..
Help will be greatly appreciated..!!
I don't think that you'll be able to put javascript in a formula field and use it on the page. Is this something that appears on a standard record view page and opens a visualforce window?
Yes, this will be the formula field to one email field in standdard detail layout.
On clickikng that field value, VF should be opened in new window with fixed size.
Hi Aruna,
I am not sure if this would help, you can open a vf page on click of that link and write javascript in page to resize it. I am not sure but we can give a try ?
Ashok
Hey Guys,
Finally comes the solution for the same:
I have used formula field to redirect to VF page and setting the height and width while loading the window as below:
Formula field:
HYPERLINK("/apex/TestPage", Email)
VF resized window script:
<html>
<head>
</head>
<body onload="moveTo(0,0); resizeTo(400,300);">
hello
</body>
</html>
This is the required solution and finally got it...
Yippppppppeeeeeee.. :)