JavaScript is primarily used as a client-side scripting language. So, there is no way to do this directly, but there are other ways to accomplish this. If the user is entering the number in a text field
(<INPUT type-="text"), you could have the user click a button or a link that that would submit the form to the server and then either run a server side script (agent in LotusScript or Java) from the WebQuerySave event of the form that could retrieve the value and write it to profile doc, or add it to a querystring parameter. You'd then redirect them back to the form with additional information, which would be added via a WebQueryOpen agent. There are other ways that might work, but an approach similar to the one outlined above is probably the most flexible.
This was first published in May 2002