I have an Editable Field and Computed Text in a web form. The Editable Field gets the value from a cookie when the onLoad event occurs. It works fine, everytime I change the value of the cookie, the Editable Field’s value also changes (at onLoad event).
Now I want to display different messages in the Computed Text as the Editable Field changes to different values.
It seems I cannot grab the Editable Field’s value, I guess because the Computed Text value is computed prior the onLoad event (when the Editable Field’s value is “”).
You’re right, you computed value doesn’t display anything because it’s computed on the server side, before the client (browser) catches the cookie.
I think the best solution is to keep working on the onload of the web form so next thing you do after loading the contents of your cookie in your editable field is modify the value of the computed text.
To do this you will need to change your form, you will need to surround your computed text by a div tag or something similar
COMPUTED TEXT
So with Javascript you should be able to write the content of this DIV
The point here is that anything that Domino computes (computed fields, computed text) is done on the server, while the onload event fires in the browser long after the server has finished doing its stuff. Assuming that the cookie has been previously created, though, it will be available at the server. There are two ways to get the cookie value: use a computed-for-display field called HTTP_COOKIE that is computed to itself; or use @GetHTTPHeader(“Cookie”) in a formula. You can still use a