How to make a button open a new window

Dear all,

Do you know what to do to have a button that opens a web screen in a new window?

Hi Pedro,

To make a button open a new window you should:
1 - Select the button. The destination could be set to the same page, although it does not matter.
2 - Dbl-click Extended Properties
3 - Add a new onclick property
4 - Value = "; return false;"

And that should do the trick.
Tiago Simões

Doesn't the target property work here?

Or does it only work for links?

If it does, just go to extended properties add

property value

target "_blank"

Best regards,

Diogo C S Cordeiro
Hi Pedro,

If what you need is to execute the action associated with the button but open the output in a new window you'll have to use something like this

function PostToNewWindow() {
var form = document.getElementById('WebForm1');

/* if you need to open always in the same window use */ = "osWin";
form.onsubmit += "'about:blank','osWin');"
/* if you want to open always a new window use */
/* = "_blank";

function ClearTarget(form) {
var form = document.getElementById('WebForm1'); = "";

Then use the extended properties of the button to put on the onclick event the call to PostToNewWindow().

Hope this helps. Cheers,

Tiago: It worked perfectly. I already had tried that way but i was missing the 'return false' and that's why it didn't worked.

Diogo: You're right. The target property don't work for buttons

André: I tried hard but I couldn't put your solution working. I know just a little of javascript so... But I really would like to have it work since I was planning to build a webblock (like the one in the forums to open a new window from a link) so things become more easier when we want to do this.

Thanks to all.