Coding Thread, Need script to get IP and display relevant content in Coding and Web Development; Hello. Hope I am in the right forum!
I know nothing about javascript but need a script that will:
get ...
-
10th December 2007, 09:02 PM #1 Need script to get IP and display relevant content
Hello. Hope I am in the right forum!
I know nothing about javascript but need a script that will:
get the computer IP address
IF IPaddress="217.x.x.x" then {
display an image}
else {
run a script I have
}
The problem is I have a nice animated slideshow on the VLE but it crashes when viewing over remote desktop.
Anyone?
Thanks
Darren
-
-
IDG Tech News
-
11th December 2007, 08:56 AM #2 Re: Need script to get IP and display relevant content
I'm not sure if you can do it client-side because javascript running in your browser doesn't have access to your IP address unless you set your security settings very low. I'd be a little wary of setting your browsers to trust the VLE because of all the user-uploaded content on there.
You can do it from the server end if you have ASP/PHP etc. - what's the VLE and what kind of server is it running on?
-
-
11th December 2007, 08:01 PM #3 Re: Need script to get IP and display relevant content
Thanks for the response.
That's a shame.
It is MS Sharepoint and I suspect it is running on IIS. It hasn't got anything additional installed such as PHP.
-
-
11th December 2007, 09:17 PM #4 Re: Need script to get IP and display relevant content
If it's on IIS, you could probably make an ASP page on that server containing something like:
<%@Language="JScript"%>
<%
strIP = ServerVariables("REMOTE_ADDR");
if (strIP == 'IP.OF.YOUR.TSERVER') {
Response.Redirect("tserveralternative.html");
}
else {
Response.Redirect("animatedslideshow.html");
}
%>
Then make your link on Sharepoint point at that asp page.
(code not tested, may contain nuts)
-
-
16th December 2007, 06:10 PM #5 Re: Need script to get IP and display relevant content
Great, thanks.
I will look into this.
-
-
16th December 2007, 06:26 PM #6 Re: Need script to get IP and display relevant content
I have a VBS script when it is run it will display the computer name and IP address is that relivent?
Z
-
SHARE: 
Similar Threads
-
Replies: 2
Last Post: 14th December 2007, 10:33 AM
-
Replies: 18
Last Post: 30th October 2007, 08:22 PM
-
By tosca925 in forum Windows
Replies: 7
Last Post: 17th May 2007, 11:42 PM
-
By SimpleSi in forum Virtual Learning Platforms
Replies: 19
Last Post: 17th January 2007, 01:23 PM
-
Replies: 6
Last Post: 16th September 2006, 09:33 PM
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules