Return to Snippet

Revision: 3062
at August 9, 2007 14:23 by nicolaspar


Updated Code
function getPartUrl(part) {
  var query = self.location.href;
  if( query.indexOf(part) == -1 ){
  	return false;
  }else{
  	return true;
  }	
  
}
//Example
<script>document.write getPartUrl('news.php') ? 1 : 0</script>

Revision: 3061
at May 30, 2007 12:48 by nicolaspar


Initial Code
function getPartUrl(part) {
  var query = self.location.href;
  if( query.indexOf(part) == -1 ){
  	return false;
  }else{
  	return true;
  }	
  
}
//Example
getPartUrl('news.php')

Initial URL


Initial Description
Para marcar navegaciones según la página.

Initial Title
Javascript - Get Part Url

Initial Tags
url, query

Initial Language
JavaScript