WebQueryOpen / onLoad question

Hello,

When I open a form on my system in Web, I set some fields with an agent at WebQueryOpen:

doc.Status_1=doc.Status(0)

In the javascript onLoad event I need to perform some comparisons with Status_1 field:

if (document.forms[0].Status_1.value==‘AWAITING APPROVAL’ ){…}

When I open the document I get an Internet error message saying “Status_1 is null or not an object”.

But Status_1 field exists and is shown on screen!

Which event occurs first: WebQueryOpen or onLoad? Why this error happens?

Regards

Subject: WebQueryOpen / onLoad question

Yes, but is Status_1 an actual input field or is it a computed type of field? My guess is that it is a computed field and document.forms[0] only sees input type of fields.

Subject: WebQueryOpen / onLoad question

This particular error comes if the Field that u’ve not a Editable Field.That should take care of it.

PS : Can u pls post the code of the agent that u’ve used in the WebQueryOpen as i m unable to set any Field value using it.Error msg:The Page cannot be displayed.I’d to use Javascript in the end.Maybe I was missing something.

Thanks.

Subject: RE: WebQueryOpen / onLoad question

Hello,

I was opening the document throught ?Opendocument url, so the field couldn’t be accessed by javascript onLoad event.

When I changed to ?Editdocument it opened without any more message errors.

Thanks!