I want to have a check in my javascript if the page loading up is on my local machine.
The reason why I want to do that is that when I developing I like to make sure
The above answers mostly solve the problem but...
One solution is to set the location hash and check it.
http://myname.foo.com/form.html#devValidation
You could add unlimited options with a switch
switch(location.hash) {}
case '#devValidation':
// log the results and post the form
break;
case '#beValidation':
// skip front end validation entirely
break;
case '#noValidation':
// skip all validation $('[name=validationType']).val('novalidation');
break;
case '#feValidation':
default:
// do fe validation
break;
}