Re: ASP, Javascript Frontpage 2000

From: Jon Spivey (jons_at_mvps.org)
Date: 05/12/04


Date: Wed, 12 May 2004 16:48:17 +0100

Hi Ryan,
The asp script you posted will work just fine - assuming your server
supports asp. Obviously yours doesn't. You can't get an IP address with
javascript - the second script you posted uses server side scripting (looks
like PHP to me) to grab the ip and javascript to display it.

Bottom line - you will need some server side script. What is available to
you? If you're not sure ask your host

--
Cheers,
Jon
Microsoft MVP - FP
Ryan Fleming wrote:
> I apolagize if this is not the proper forum in which to post this
> question.  I have a website developed with frontpage 2000.  I am
> trying to create a very simple web page.  One tbat either uses asp or
> javascript, and will simply display the IP Address of the person
> viewing the page.  I have found a few free examples, but cannot seem
> to get them to work on my web site.
>
>
> In both cases I see remote_addr  as a returned value and not my ip.
> Any help in answering or directing me to the proper forum to ask this
> question would be greatly appreciated.
>
> Thanks
>
> Ryan
>
> Code examples below:  I simply pasted this text into the body of html
> page.
>
>
> asp script
>
> <% Response.Write Request.ServerVariables("REMOTE_ADDR") %>
>
>
> javascript
>
> <p><!-- ONE STEP TO INSTALL IP ADDRESS:
>
>   1.  Copy the coding into the HEAD of your HTML document  -->
>
> <!-- STEP ONE: Paste this code into the HEAD of your HTML document
> -->
>
> <HEAD>
>
> <SCRIPT LANGUAGE="JavaScript">
>
> <!-- This script and many more are available free online at -->
> <!-- The JavaScript Source!! http://javascript.internet.com -->
>
> <!-- Begin
> // http://www.kdcgrohl.com
>
> // Depending on your server set-up,
> // you may need to use the ".shtml"
> // extension [instead of the "html"
> // or "htm"] as the script uses Server
> // Side Includes. To display in the
> // title bar, exclude the
> //"<title></title>" code from the page.
>
> // This part gets the IP
> var ip = '<!--#echo var="REMOTE_ADDR"-->';
>
> // This part is for an alert box
> alert("Your IP address is "+ip);
>
> // This part is for the status bar
> window.defaultStatus = "Your IP address is "+ip;
>
> // This part is for the title bar
> document.write("<title>Your IP address is "+ip+"</title>");
> //  End -->
> </script>
>
>
> <p><center>
> <font face="arial, helvetica" size"-2">Free JavaScripts provided<br>
> by <a href="http://javascriptsource.com">The JavaScript
> Source</a></font>
> </center><p>
>
> <!-- Script Size:  1.09 KB -->
> </p>


Relevant Pages

  • Re: Stopping someone From Steeling Your Scripts
    ... prompted for your server login to view any page with the script linked to it ... from the _private folder. ... JavaScript is client-side, meaning that it is executed in the browser, ... page with a link to the script. ...
    (microsoft.public.frontpage.client)
  • Re: help getting value of cell and passing to PHP file
    ... locally run VBScript file using task scheduler on one of my servers. ... to click on any cell entry and have it send that value along with the server ... original script. ... think that might require some javascript as well though.. ...
    (comp.lang.javascript)
  • Re: Refreshing parts of a web site
    ... AJAX script that checks the server every X minute and change the ... I found and modified a JavaScript that updates a div tag. ... Half lies are worth twice as much as whole lies. ...
    (alt.html)
  • Re: History Replacement And New Location Combined
    ... will stop your script dead in its tracks. ... In his book "JavaScript - The Definitive Guide", ... clear the URL entry field in our form. ... Server Side Includes). ...
    (comp.lang.javascript)
  • Re: Hiding personal data in source code viewable on the internet
    ... >> Re-create the form in pure HTML (do not use the FP Web components to ... In Script: grab the data submitted by the form. ... >> component supported for your server. ... >> combination of HTML and ASP script. ...
    (microsoft.public.frontpage.programming)