If you're using Internet Explorer, the first thing you should notice is that there's no border flopping around the above applet when you mouseover it, and no popup saying 'Click to activate and use this control'. That's the point of doing it this way! This applet runs using the instructions below!


This is just as easy as the other way once you get thinking right about it. You still need the same three (3)items; the lake.class file, the image, and an html page with some code on it in the same folder, plus one more item. (4) A javascript file named something.js.

Here's the deal. You're used to placing some applet code right into your html page and changing the image name, applet width and height, right on your html page.

You do the same when adding an applet this way, except you'll change any applet code in the .js file, rather than on your html page itself, and then you'll simply add a small script to your html page calling for the .js file containing the applet code.

Like I said before, don't go all security nuts now. There's nothing dangerous here. Just make a new test folder for testing and download these items into that test folder on your computer. You may have to rightclick and 'save picture as', or, 'save target as'.

the .js file
the lake.class file
the image

If you wish, Rightclick and 'Select All' or. block the text on this page. Hold down Ctrl and hit the letter C, then open Notepad and Paste it in.(hold down Ctrl and hit the letter V), and save or print these instructions out. Beats printing the whole page!!!

Now comes the fun part. Make a new html page and save it into the same test folder as something.html. Reopen that same html page in whatever editor you're using and block, copy, and paste this short code in the body section where you want the applet to be:

<center><script type="text/javascript" src="quickt.js"></script></center>

Save your page and View it.

Now, you will want to use your own image of course, so first add the new image to this same test folder. Next you need to change the applet code, so open Notepad. Everyone has Notepad! Click 'File' (upper left), Click 'Open' and click the arrow by where it says 'Text Documents' and change it to 'All Files'. Now, navigate to your test folder, find and open 'quickt.js'.

Don't go all nuts here!!! Just change the image name 'crater-1.jpg' to the name of the image you're going to use (the one you just added to the folder). Now, change the width (300) to your new image width, and change the height (376) to twice your image height-20 or so points. The same as you'd normally do.Now, change the 'href' value to the name of the page you have your applet on. If its in the same folder, just use a relative link like so 'quickt.html', using your own page name of course. If you don't add the 'href' value, its possible that when someone clicks on the applet they'll be redirected to another website. The 'target="_self"' simply says 'hey browser, open this same page in the same window again', so when its clicked it just pops your own page back up, instead of taking your viewer to some different website. If for some reason you actually want them to go to another webpage, by all means, add the url without the 'target="_self"'

Now, the .js file can be saved as anything you wish to name it. Got that?

So, once done, click 'File' and click "Save As' Make sure that your test folder name is in the very top box, and make sure it says "All Files' in the middle box at the bottom and not "Text Documents'. By File name type in lakeapplet.js and click 'Save'.

Now, open your html page and change quickt.js in the script to lakeapplet.js. Save and View!

The point being; it doesnt matter what you name the .js file as long as its saved as something.js, and the script on your html page calls for the same something.js name.

You can still slap a table border around your applets like I said on this page:   border around applet  Just wrap it around the short script rather than around the applet code like you'd usually do.

You can do this with any applet, not only the Lake. I've got sample .js files for most applets.

By the way, in case you're a beginner and don't know, most of the time when you want to preview an applet or a flash movie from your own computer (locally), with windows xp, you're going to get an activex warning. Just rightclick the bar and allow the pain in the butt thing to run! It does no harm and it will not show once you've uploaded your stuff!


Any problems? Email me at   Bruce    kineu_2@yahoo.com


return