dagza Posted December 10, 2007 Posted December 10, 2007 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
sahmeepee Posted December 11, 2007 Posted December 11, 2007 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?
dagza Posted December 11, 2007 Author Posted December 11, 2007 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.
sahmeepee Posted December 11, 2007 Posted December 11, 2007 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)
FN-GM Posted December 16, 2007 Posted December 16, 2007 I have a VBS script when it is run it will display the computer name and IP address is that relivent? Z
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now