Window pop up.. errors.. null or not an object

I have the following code on the onload event of a form on the web.

It references a field called popup that is on the form. Cant figure out why it keeps failing with the error “popup is null or not an object”.

popup is a computed text field on the form that calculates a value

var f=document.forms[0]

current = f.popup.value;

         

     window.open("http://server/DB.nsf/(membereditlookup)/" + current+"?editDocument","newwindow")

    return

Subject: field not known at onLoad event

Hi David

I guess that your field popup is not known at the onLoad event. Try to put your code with passthru HTML directly on the form and not into the JS events. Replace the JS variable “current” by a Notes field that displays the value of your popup field.

e.g. on the form write the follwing code and put in a Notes field where xxxxxxx is

The field might be the popup field directly, or a computed-for-display field which holds the value of popup.

HTH

Bodo