Where is the hosts file?
The hosts file lets you point specific ip adresses to domains, on your filesystem, instead of letting this be resolved at the DNS level.
Mac OS X 10.2 or later
Edit the /private/etc/hosts file.
Windows 95/98/Me c:\windows\hosts
Windows NT/2000/XP Pro c:\winnt\system32\drivers\etc\hosts
Windows XP Home c:\windows\system32\drivers\etc\hosts
windows Vista C:\Windows\System32\drivers\etc
change "C" for your os drive
javascript redirect
To redirect the browser clientside. You can use javascript. This can be done in different ways.
Like this:
<SCRIPT LANGUAGE="JavaScript">
<!-- Script courtesy of http://www.thetutorial.org
window.location="http://www.thetutorial.org";
// -->
</script>
or with a function like this:
<script language="JavaScript">
<!--Script courtesy of http://www.thetutorial.org
move() ;
function move() {
window.location = 'http://www.yourdomain.com'
}
//-->
</script>
Javascript go back code
This can be done in many different ways, for instance like this:
<a href="javascript:history.go(-1)"> Go Back</a>
or with a form like this
<form>
<input type="button" value="Click here to go back"
onClick="history.back()" />
</form>
the history parameter can be set, to for instance 1 or -1 one.. reflecting the movement forward or backward in the history of the browsed pages.
history.go(-1) or history.go(1)
Textfield highlight on focus
Do you want the text in a textfield to automatically be highlited when the user clicks it?
then use the code:
<input onFocus="javascript:this.select()" type="text" value="test" />
magic is in the onfocusevent, and the call to the method select:
onFocus="javascript:this.select()"
remove the ie7 image toolbar
Like so:
<HEAD>
<TITLE>My Site</TITLE>
<META HTTP-EQUIV="imagetoolbar" CONTENT="no">
</HEAD>
Print webpage with javascript
The easyest way to print a page, is to simply write an anchor tag, like so:
<a href="#" onClick="javascript:window.print()"
> Print this Page!</a>
result:
Print this Page!
Oneclickmeta
This is a plugin for Wordpress. Inputs meta description and keywords in one klick, simple and smooth. Nothing to adjust, it just works!
Description
This is a one click plugin to "on the fly" -generate meta keyword and description. One klick no hussle.
- The plugin uses content on the present page to generate description and keywords in the metadata header.
- At present 2 things can be altered (optional). This is done in the code of the plugin, at rows 37 and 40.
- The plugin strips common words from the text (to use in the description), the percentage of common words to strip can be altered. It
defaults t0 25%. Also the max amount of words can be altered, this defaults to 150 words.
Download!
Installation
- Upload `oneclickmeta.php` to the `/wp-content/plugins/` directory
- Activate the plugin through the 'Plugins' menu in WordPress
Remove firefox klick outline
To remove the klick outline in firefox. Use the following in your css.
a {
outline: none;
}
Rss on your website, the simple way
i recently (yesterday) created a pure rss page. It is made to display several rss flows on one page. Here is the page (it is on the seo topic, and covers the best seo-blogs in the world imo).
Continue reading »
Pause flash with actionscript
There are alot of samples out there on how to pause the timeline, bit not som many on how to pause the flow of frames itself. So here you go:
Continue reading »