T his is a cool little one part copy and paste code that displays the user's IP address in the title bar, status bar, and/or an alert box.
We have tested the code in IE 7.0, IE 6.0, Netscape 4.08, Netscape 7.0, Netscape 8.1.2 Firefox 1.5.0.2, Firefox 2.0.0.3, Opera 8.54, Opera 9.20, and AOL Explorer 1.2. This script worked well in all platforms tested with one variation observed in Firefox 1.5.0.2 and one in IE 7.0.
D epending on your knowledge of HTML and javascripts, this is an easy, one (1) step copy and paste code that is inserted into the <HEAD> section of your document. Once inserted in the <HEAD> section, your visitors will see their IP address in the title bar, status bar, and/or an alert box will pop up. If you desire to remove any of the "show" options, just delete the respective part as we shall show you below howto delete an option.
A lso, if you check to see it working and you are in your "Editor", you will not get your IP address but something that looks to the effect of;
Your IP address is <!--#echo var"REMOTE_ADDR"-->
D o not get worried about this. It just cannot read the proper IP address when in an editor. Once you open the page online and not in your editor, it will function properly.
Reconfiguration And Or Deletion Of Functions
// This part is for an alert box
alert("Your IP address is "+ip);
You will have three little sections just as the above with the exceptions of they will say for the title bar, for the alert box and for the status bar. Which ever of these you do not want, just delete that two line part of the script.
If you would like to see an example where you will see your IP in the Title bar, grab the below link and you are there.
[ Example With Effect In Title Bar ]
W
e hope our tutorial was easy to follow and we covered everything in detail. If you would like to add this effect into your pages, grab the respective below link and you are there. If you have any problems with this or anything else, feel free to consult our [ FAQ ] and if you can't find the answer there, [ contact us ].
[ Get Code Here ]
[ Rate This Page ]
Search Our Site By Individual letter
[ A ]
[ B ]
[ C ]
[ D ]
[ E ]
[ F ]
[ G ]
[ H ]
[ I ]
[ J-K ]
[ L ] |
Little Tips Directory [ Page 1 ] [ Page 2 ] [ Page 3 ] [ Page 4 ] [ Page 5 ] [ Page 6 ] [ Page 7 ] |
[ Index Page 1 ]
[ Index Page 2 ]
[ Index Page 3 ]
[ Index Page 4 ]
[ Index Page 5 ] [ Index Page 6 ] [ Index Page 7 ] [ Index Page 8 ] [ Index Page 9 ] [ Index Page 10 ] [ Index Page 11 ] [ Index Page 12 ] [ Index Page 13 ] [ Form Index ] [ 2001 ] [ 2002 ] [ 2003 ] [ 2004 ] [ 2005 ] [ 2006 ] [ 2007 ] [ Disclaimer ] [ News Letter Archives ]
[ Navigation Page ]
[ Archives Of Published Material ] |
If you are part of the ever growing number of webmasters who enjoy
sharing your knowledge with others on web design, join The
Consigliere Ltd. web ring to broaden your scope of exposure.
Join Today
This Site Was Built And Is Maintained Exclusively by
The Webmaster @ Consigliere Ltd.
Copyright © Consigliere Ltd., All Rights Reserved. 2001-