Categories:

Home / Free JavaScripts / User System / Here

Cut & Paste IP address display (using SSI and JavaScript)

Credit: HostRoute

Description: This script captures the IP address of the person filling in your form and submits it to you as part of the form. The IP address is displayed in a text box which the user cannot edit. The script works by taking the #echo var="REMOTE_ADDR" from SSI and using JavaScript to place it in the text box. Although it is possible to do it with JavaScript alone, this only works with Netscape and as far as I can tell, using SSI is the only cross browser way of doing it. You will need a web server capable of running SSI (most web servers do this by default). The page with the form in it needs to have the suffix .shtml to tell the server to parse it.

Example: Your IP address is:

Directions: Add the following to the BODY of your document:


JavaScript Tools:
Site Info


CopyRight (c) 2018 JavaScript Kit. NO PART may be reproduced without author's permission. Contact Info