If you want to open a URL based on the click of a button, set the Button action property to "Client Operation". Then, set the When button pressed property to the following:
var url = eworkGetField("txtURL","");
var wnd =
window.open(url,
"",
"menubar=no,toolbar=no,location=no,width=650,height=500,resizable=yes");
This example opens a new window based on the contents of one of the fields on the form.