Set IP Address from VPN

This script will get the ip address to set the /etc/hosts file in Windows. I use this script in conjunction with the VPN software I use to log into a client’s network. Once on their network, I rest my /etc/hosts file to that my system recognizes the IP address for testing purposes. THE NSLOOKUP GETS THE SVN SERVER IP ADDRESS …

Webpage Redirect

Webpage Redirect   The webpage redirect code is used to automatically redirect to another page when your user lands on the page. <html> <head> <title>Page Title</title> <SCRIPT LANGUAGE=”JavaScript”> redirTime = “0”; redirURL = “http://www.anotherwebpage.com”; function redirTimer() { self.setTimeout(“self.location.href = redirURL;”,redirTime); } </script> </head> <body bgcolor=”#FFFFFF” text=”#000000″ onLoad=”redirTimer()”> <h2>Page Header</h2> <a href=”http://www.anotherwebpage.com”>Click here if you are not redirected.</a> </body> </html>

Select Radio By Clicking Table Row

This code will set an event on a table row, so that when the row is clicked, the radio button is select.  It is used to easily select a radio button associated with the row.  jQuery can also do this with a smaller coding foot print.  This is just an example of how you might provide this functionality with JavaScript. //************************************************************************************************************* …

List files in a directory using JSP

This JSP code will display a specified directory and all the files contained in that directory.  I used it to display a list of daily logs.   <jsp:include page=”../includes/header.jsp”> <jsp:param name=”report” value=”active”/> <jsp:param name=”title” value=”Your Title”/> </jsp:include> <!– ************************************************************************************************** –> <%! public void GetDirectory( String the_Path , Vector the_files , Vector the_folders ) { File c_Directory = new File( the_Path …

DOM Check Using Javascript

DOM Check was a snippet of code I found early in my education of JavaScript.  I still use it occasionally.  It will show all the DOM objects in your page.  DOM Check is very easy to use.  Simply add the button inside your form, and the Javascript to the bottom of your HTML page prior to the closing BODY tag. <input …