How to automatically reload a page when it is finished reloading, using javascript

So, you have a web page (HTML, PHP, etc.) that you want to reload over and over. And at the same time, you want to be sure that the entire page loads before it starts the loop over again. Here is a javascript way to do just that. Simply include this script in yout HTML code, and watch the magic:

<script language="javascript">
window.onload=new Function("window.location.reload();");
</script>

Enjoy!

Posted under WebDev

This post was written by Content Curator on October 3, 2008

Tags: , , , , , , , , , , , , , ,

Fix 403 Forbidden error in OTRS/Apache

This applies to (at least) OTRS 2.2 on Fedora Core 6 running Apache 2:

To fix this, change the following in the file /etc/httpd/conf.c/otrs.conf
Find the line that reads “Deny from All”, and comment it out by placing a # at the beginning of the line.

Save the file.

Restart Apache

# service httpd restart

Now try browsing your webserver otrs from other machines, success!

Posted under Linux, WebDev

This post was written by Content Curator on December 4, 2007

Tags: , , , , , , , , , , , ,

Making text “float” around your images using CSS

The CSS property “float”, when applied to an image will cause that image to -float- over to the left or right side of the conatiner they are within. The text flows around the image as you see in magazines and newspapers.

A simple addition to your stylesheet:

img.floatLeft {
float: left;
margin: 4px;
}
img.floatRight {
float: right;
margin: 4px;
}

Then, set the img tag to use the class:

<img class="floatRight">...

Viola!

Posted under CSS, WebDev

This post was written by Content Curator on October 11, 2006

Tags: , , , , , , , , , , , , , , , ,

Easy Post Editing with WordPress

WordPress provides an easy method with which you can update your posts easily as you view them within your site. It is simply logging into your admin area, then viewing your site as a normal visitor. You can edit articles/posts/pages as you view them.

Here’s how:
Login to your site’s Admin area. This is usually something like “http:///www.yoursite.com/wordpress/wp-admin”.
Once logged in you’ll see a link at the top of the admin page that you’re looking at (just following your website name) that says View Site >> . Click It.
Now you’re viewing your website. Simply go view the page that you want to edit. You’ll notice a link below the article that reads Edit or “Edit this entry” or something to that effect.
Just click thet Edit link, and you’re in edit mode. Edit as usual.

Posted under WordPress

This post was written by Content Curator on October 11, 2006

Tags: , , , , , , , , , , ,