Navigator with Alert
Before we go onto the 'no-button' navigator, how about an alert message before the browser opens? Try this one:
Click here
You can change the destination to anywhere on your site. For convenience, I have used this page, but it can be virtually anywhere. So how is it done? Easy, simply copy the following and alter the areas in red:
<A HREF="java2.html" title="Click here" OnMouseOver="window.status='Click here'; return true"; OnClick="window.alert('When you click OK this page will refresh')" onfocus="this.blur()"><b>Click here</b></A>
No-Button Navigator
This is really neat! Instead of having a button to click to send your visitor to the next page (or wherever), you can send them 'automatically' once they have highlighted the page selection. Have a go! (Click on the 'Back' button on your browser to come back here!)
This has slightly more to cut and paste, plus the bit in the <HEAD> section is different, but here is the code for the <BODY>...
<FORM NAME="navsel" ONSUBMIT="pagejump(document.forms[0].whereto.options[document.forms[0].whereto.selectedIndex].value); return false">
<SELECT NAME="whereto" ONCHANGE="pagejump(this.options[this.selectedIndex].value)">
<OPTION>There are more Panda pages here!</OPTION>
<option value="java.html">Javascripts</option>
<option value="tables.html">Tables</option>
</SELECT>
</FORM>
Don't forget to change the red bits to your own site's pages.
Now for the code in the <HEAD> section...
<SCRIPT LANGUAGE="JavaScript">
<!--//
function pagejump(to_url) {
if (to_url != "") {
window.location=to_url
}
}
//-->
</SCRIPT>
That's it! You can add as many 'option value' lines as you want, but unlike the previous drop-down box, each <option value> line must end with </option>
Top
No-Cache Script
Here's an easy one. If you up-date your pages quite often, and a visitor has 'cached' the page, or in other words has the page strored in the 'history' contents of their harddrive, then when they re-visit the page they will see the old page.
To prevent this, so that they always see your latest page, insert the following code in the <HEAD> section of your page, just under the meta-tags:
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
Top
Scrolling Marquee
This is a nice script, courtesy of Website Abstraction again. If you want to say a lot, but you are stuck for space then try a stop-start scrolling marquee.
Start | Stop
To pause the marquee, click on Stop, to re-start click on Start.
You can change a couple of the parameters, I have highlighted the options in red below so you can make it fit on your page however you want it to look.
The code is:
<marquee id="scroller" scrollAmount="5" direction=up width="250" height="150" style="background-color:lightyellow;border:1px solid black">This is where you write what you want to say.</marquee><br>
<b><a href="javascript:scroller.start()">Start</a> | <a href="javascript:scroller.stop()">Stop</a></b>
<script language="JavaScript1.2">
if (document.all)
scroller.stop()
</script>
Don't forget to break up the paragraphs in the scrolling marquee by adding <P> otherwise the sentences will all continue without a break!
In other words, in the part This is where you write what you want to say.<P>This is the next paragraph.<P>This is the next one!
Top
[1] [2] [3] [4] [5] [6] [7] [8]
<<< Previous page
|