RM & A
Who we are.
What we're doing
Services Offered
Pricing
Newsletter
Working Things
Guest Book
Links
Site Map

 

 

 

BuiltWithNOF03
Visual NEWSLETTER

The Visual NEWSLETTER is published on the first of each month. The newsletter is set up to publish letters from you and about programs development in Visual C++, HTML, DHTML, JAVA and from things we have found. If you have questions about applications or program questions send them to us, or if you have any neat tricks please drop us a line.

If you would like to subscribe to the Visual Newsletter for free.

Send your request to questions@rm-a.com or fill out the Guest Book and select the Yes box to subscribe to the Visual Newsletter.

This newsletter well not be e-mailed with out a subscription request.

Today's Internet tip:

DHTML

Speeding up Opera 6

One way to speed up your Opera 6 startup and shutdown times is to reduce the history and cache sizes. To do this, run Opera 6 and then choose File|Preferences. Click the "History and cache" listing and then click in each of the History settings and reduce the number of addresses saved. We use 25, but you can use more or less depending on your needs.

Now, click in the "Disk cache" entry box and reduce that number. We use 500 KB.

After you're finished adjusting your History and Cache numbers, click OK to close the dialog box and apply your new settings.

Java Script and other scripting languages  allow you to modularize code easily by fitting it into functions. You define a  function once, then call it many times in a variety of situations. If we wanted  to feature more than one bulleted item in our list of sites to visit, it would  make sense to put the rollover code into a function.

Here's some code that illustrates how functions can be put into use in our  image rollover application:

<html>
<head>
<title>Image Rollover Demonstration  with Functions</title>

<script language="JavaScript">

function lightOn()

{

document.images[0].src = "lightbulb_on.gif"

}

function lightOff()

{

document.images[0].src = "lightbulb_off.gif"

}

</script>

</head>

<body>

<h1>List of Ideas</h1>

<p>

<a href="http://www.yahoo.com"

onMouseOver="lightOn()"
onMouseOut="lightOff()"

>

<img name="bulletBulb" src="lightbulb_off.gif">

Let's visit Yahoo!

</a>

</body>
</html>

How does this work? Look at the event handlers again. They look like this  now:

onMouseOver="lightOn()"
onMouseOut="lightOff()"

The code that's executed in each case consists of a call to a function. The  onMouseOver= event handler triggers the lightOn() function; the onMouseOut=  event handler triggers the lightOff() function. We'll cover what functions are  in our next tip.

Established August 2, 1993

Prepared by Raymond Mills (Raymond Mills & Associates (RM-A))
Permission is hereby granted to download, reprint, and/or otherwise redistribute these files, provided appropriate point of origin credit is given to the preparer(s) and
Raymond Mills & Associates (RM-A)
This page was created with the NetObject Fusion