Find us on facebook

 

You are here:Home>News>Updated JavaScript Tools

Updated JavaScript Tools

Written by  Alex (Administrator)

Now we have given you a lot more scripts to choose from and we have also changed the way this page works so that it updates the page in-line rather than going to a new page. The page also puts in the name of the site being administered (where relevant) automatically.

Getting started

These are all live and ready to use within the control panel for all our web hosting customers that have this feature ( Silver and Gold ). Simply log in to HostSphere control panel, scroll down to ‘Web resources’ and click on the ‘Javascript maker’ icon.

The brand new javascript features include …

AJAX include

This basically behaves a lot like using an <iframe>, but without actually using an <iframe> and is launchable via Javascript. It’s the same kind of thing that Facebook does when loading the news feed.

Auto-refresh

Automatically reloads the page after a set interval. This is similar to a <meta> refresh except that it potentially gives you more control.

Break frames

This is an updated (and essentially unchanged) one. If your web page is being loaded from a frame, it will reload itself without the frame.

Click to expand

This is probably one of the first things people would want to do with Javascript. You click something, something expands. You click it again, it goes away. There are many ways to do this; the approach used in this case should be accessible to novices.

Date picker

This is a pretty common use of Javascript that you see out in the Internet. You click on a text input, and instead of having to type a date (or use awkward dropdowns) it presents a simple calendar interface.

HTML5 <input> placeholder

There are situations where you want to demonstrate what to put into an <input> box, but don’t have the screen space to do it. A common technique to deal with that is to put some text in by default which gets wiped when you first click in there. This is an improved version of that technique, which emulates support for the <input placeholder> attribute on browsers which don’t support it.

Image swapper

Swapping images around like you see on Amazon and similar sites is really easy. This snippet just requires you to put your thumbnails somewhere predictable, and basically takes care of the rest.

Inline popup

Provides a pseudo-popup, like we use in some places. It’s useful to provide in-front information without getting caught by popup blockers. To close the popup, you just click anywhere in the background.

Get title from <h1>

This is another one that we use ourselves, to save having the title written twice in each page.

Language

This is another pre-existing snippet, although rewritten to be easier to use. It detects the browser language and redirects to an appropriate page.

Logo branding

This is another pre-existing one – it used to suggest that you could make your site look like Geocities by slapping a logo in the corner. It still does that basic task, but in a simpler way.

Sort table rows

This is a task that’s quite commonly handed off to a CGI/PHP script, but it doesn’t need to be. The snippet shows how to sort by any column you like.

Word tooltips

This is the same basic way that we provide glossary information in support database articles and tickets. For a pre-defined set of words, if you hover over the word a “tooltip” appears.

Latest from Alex (Administrator)

Your Comments

Search The Blog

Categories List

Advertisements