Hi,
The javascript in my page is not working, itstead of alerting me the ip
address, it alerts me with string "<!--#echo var="REMOTE_ADD R"-->".
var ip = '<!--#echo var="REMOTE_ADD R"-->';
alert("Your IP address is "+ip);
How do I fix the problem?
Thanks.
Jason 7 14749
In <ci**********@n ews.seed.net.tw > Jason wrote: Hi,
The javascript in my page is not working, itstead of alerting me the ip address, it alerts me with string "<!--#echo var="REMOTE_ADD R"-->".
var ip = '<!--#echo var="REMOTE_ADD R"-->'; alert("Your IP address is "+ip);
How do I fix the problem? Thanks.
Jason
Your JS is incorrect. Try here for an example of how to do what you
want: http://javascript.internet.com/user-...p-address.html
As a tip for the future, if you want to do anything in JavaScript, go to
Google and put in something like:
javascript get IP address
That's exactly what I did to get the above. Then, when you have
something that is nearly working, come here and you will get very good
advice.
Cheers, Fred
Thanks Fred,
I did the same google search and visited the site you talked about, but it's
just not working.
Thanks anyway.
Jason
"Fred Oz" <oz****@iinet.n et.smudge> ¦b¶l¥ó
news:20******** ************@fr eenews.iinet.ne t.au ¤¤¼¶¼g... In <ci**********@n ews.seed.net.tw > Jason wrote: Hi,
The javascript in my page is not working, itstead of alerting me the ip address, it alerts me with string "<!--#echo var="REMOTE_ADD R"-->".
var ip = '<!--#echo var="REMOTE_ADD R"-->'; alert("Your IP address is "+ip);
How do I fix the problem? Thanks.
Jason
Your JS is incorrect. Try here for an example of how to do what you want:
http://javascript.internet.com/user-...p-address.html
As a tip for the future, if you want to do anything in JavaScript, go to Google and put in something like:
javascript get IP address
That's exactly what I did to get the above. Then, when you have something that is nearly working, come here and you will get very good advice.
Cheers, Fred
Please do not top-post Jason,
I find it most confusing..
<http://www.physci.org/codes/javafaq.jsp#net iquette>
See further comments in-line..
On Wed, 15 Sep 2004 16:36:17 +0800, Jason wrote: "Fred Oz" <oz****@iinet.n et.smudge> ... In <ci**********@n ews.seed.net.tw > Jason wrote:
... The javascript in my page is not working, itstead of alerting me the ip address, it alerts me with string "<!--#echo var="REMOTE_ADD R"-->".
... http://javascript.internet.com/user-...p-address.html
... I ...visited the site you talked about, but it's just not working.
Did you try flogging it Jason?
It may just be lazy.
Or to put that another way, what the heck
is 'just not working' supposed to mean?
Did you get an error page? A blank
browser window with no further information?
A web-page with text that seemed unrelated?
I tried the page myself. It popped up an
alert when arriving at the page that read
'Your IP address is nnn.nn.nn.nn'
Where all the 'n's were digits.
Once I dismissed the alert, I saw the page itself,
which has a text area with a script in it.
Did you get those?
--
Andrew Thompson http://www.PhySci.org/ Open-source software suite http://www.PhySci.org/codes/ Web & IT Help http://www.1point1C.org/ Science & Technology
Jason said: Hi,
The javascript in my page is not working, itstead of alerting me the ip address, it alerts me with string "<!--#echo var="REMOTE_ADD R"-->".
var ip = '<!--#echo var="REMOTE_ADD R"-->'; alert("Your IP address is "+ip);
That's not a Javascript problem. That script relies upon your web
server being configured to replace the text inside the single-quotes
with the user's IP address.
Even when that "works", it doesn't provide useful information in
many cases, because dial-up users may have a different IP address
each time they connect, and many other users may be behind proxies
so that hundreds of machines will all report the same IP address.
In <ci**********@n ews.seed.net.tw > Jason wrote: Thanks Fred,
I did the same google search and visited the site you talked about, but it's just not working. Thanks anyway.
Jason, there's some pointers here: http://reglos.de/myaddress/MyAddress.html
Cheers.
Fred Oz wrote: In <ci**********@n ews.seed.net.tw > Jason wrote: The javascript in my page is not working, itstead of alerting me the ip address, it alerts me with string "<!--#echo var="REMOTE_ADD R"-->".
var ip = '<!--#echo var="REMOTE_ADD R"-->'; alert("Your IP address is "+ip);
How do I fix the problem?
Your JS is incorrect.
Nonsense. The client-side JS code is syntactically absolutely correct.
However, this solution also requires server-side includes which are
obviously not working properly.
And please trim your quotes to the absolute necessary.
PointedEars
In article <19************ ****@PointedEar s.de>,
Thomas 'PointedEars' Lahn <Po*********@we b.de> wrote: However, this solution also requires server-side includes which are obviously not working properly.
I was wondering how this code worked. Thanks.
Robert This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Stefan |
last post by:
Hi,
Just set up PHP (PHP Version 4.3.3) as a CGI on a WIN2k server and tried
this:
<?php
echo $REMOTE_ADDR;
|
by: deko |
last post by:
Why is $_SERVER returning multiple IP Addresses?
Actually, I'm not sure if it's $_SERVER -- or which if/else
statement -- that's the problem, but what I'm getting as a value for $visip
looks like this:
172.16.42.181, 62.138.35.94
Why am I getting more than one IP Address? Which IP is the originating IP
Address? Is there a way to get only the originating IP?
|
by: Savas Ates |
last post by:
i have a banner for example at www.xx.com and my site is www.yy.com.. banner
has a link www.yy .com .. directed to my site.. when a user click banner
and i use this method
--request.ServerVariables("REMOTE_ADDR")-- i take the www.xx.com server ip..
i want to take ip number of the client who click the banner. what is the
problem? i cant solve it..
must it give the client number? i tried it but it doesnt.. it gives the
www.xx.com 's...
|
by: aabrahao |
last post by:
Hi,
In IIS 6, windows 2003 with php 4.3.11, the code REMOTE_ADDR
does not show the IP, but the same page in apache2triad shows the
IP.
I tried
<? $ip = getenv("REMOTE_ADDR"); print $ip; ?>
and
|
by: nishant |
last post by:
I've a structure:
struct msghdr
{
//some goes here
struct iovec *msg_iov;
//some more ---
}
| |
by: Charles Stanley |
last post by:
Hi all,
I'm new to C#, and have two pretty simple questions:
I have a class, in a .cs file by itself. I need to make use of the sole
function in this class in another .cs file. Here's the code, filename
bannertrack.cs
First question - the function "LogImpr" users ServerVariables
+ "')"; The compiler tells me that this is not included in the namespace.
??
|
by: ojorus |
last post by:
Hi.
I have a problem when I use the $_SERVER.
I'm testing a script, and the strange thing is that remote_addr returns an
ip-address only sometimes, and not always. Why can that be?
Are there any other (better) methods of getting the ip-address?
Ojorus
|
by: Frank Moyles |
last post by:
What is the equivalent for retrieving server side variables?
For example in PHP, one such predefined variable is: $_SERVER
|
by: Henry Stock |
last post by:
I don't seem to understand how to use the value:
Request.ServerVariables("remote_addr")
I am trying to pass the ip address of a sending web client in the body of an
email message.
When I compile the following code I get the this error message:
Error 1 'System.Web.HttpRequest.ServerVariables' is a 'property' but is used
like a 'method' D:\Projects\sample\comments.aspx.cs 38 78
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |