Welcome to the Tactical Panda Websites Javascript Pages
Welcome to Tactical Panda
Home Page
About Us
Contact Us
Javascripts
Tables
Free stuff on the net
Website Templates
HTML and DHTML
Using Graphics
Using Colours
Cascading Stlye Sheets
Help Page

Tactical Panda Websites

Javascript (2)

No-Buton 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="javatp.html">Javascripts</option>
<option value="tabletp.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>


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">


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.

This is where you place whatever it is you want to say.

You can place quite a bit in here.

To start the marquee click 'start' (there's a surprise!) and guess what you have to do to stop it?

To resume the marquee click on start again!

Being a marquee, when it gets to the end, it starts all over again!


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!

Click here for another page of Javascripts...

[1] [2] [3] [4] [5]

Previous Page Top of the page Home Page Contact Us Help Page

Problems? Comments? Contact our Webmaster!
Copyright © 2003 Tactical Panda. All rights reserved.