Accessing CGI via Javascript

I am attempting to access the REMOTE_ADDR via javascript. In the JS Header is: var iprem=‘’. Then on the page is some javascript to print what is in iprem to the screen. If I convert to a string I get [Object Window]. If I just display the raw variable nothing is displayed. I checked the source code in the browser and it shows the javascript to be correct. The browser’s javascript console shows no error. If I use a field and name it REMOTE_ADDR I get a proper display in the field. This is fine for me but won’t work for customers that are writing non-notes apps.

Is there something that can be done to fix this or is it a limitation of the Notes Servers?

Thanks for any help.

     Steve

Subject: Accessing CGI via Javascript

The CGI variables contain information about the browser collected by the server during a request from the browser. The REMOTE_ADDR is populated by looking at the ip address of the browser making the request. Unless you send this value back to the browser, how would you be able to read it? The client could be behind a firewall, so the ip address of the client computer might not have anything to do with the ip address seen by the server.

You also talk about non-notes apps. They would typically be hosted on some other type of web server, which would also have access to all of the non-notes specific CGI variables. You would have to do the same thing there.

Summary: You can only access server specific CGI variables through the server by passing the values back to the browser.

/Peter

Subject: Accessing CGI via Javascript

This is not something that works on Domino servers.

If you want to access CGI variables via javascript, you’ll have to write computed javascript (either in the HTML Head Content or somewhere on the form/page using PassThru HTML) combined with Computed For Display fields such as REMOTE_ADDR.