Given a recent spate of web nostalgia for my TCC keynote, it was a natch to play with something for the tilde club site Jim Groom (more likely Tim Owens) set up

I was inspired by ~dkernohan’s classy act of frames. I did a heap of frame-based web sites in the 1990s, it was then a sensible way to create a layout with common header and sidebar links. These sites included (none of these work anymore, they were perl script searches of an indexed text data file) an index of Community College Web sites, examples of Teaching and Learning on the Web (notice the syndication XML link), the Multimedia Authoring Web.


But for my tilde web thing, I wanted to do something with a LOT of frames in it. Somewhere on a beach or a plane I envisioned something like the Simon game, with each frame being a button that would generate a sound.

My frame monster includes 16 different HTMl files that are pulled together in the layout in the index.html file, it uses 9 nested framesets. These are doing by chopping the page into either rows or columns, and putting in them either the HTML link for a static content, or a nested frameset to fill in the row/column with another level of frames.

I am not going to explain much about frames, since I have a tutorial I wrote in the mid 1990s; still it’s a nested monster.

< !doctype html public "-//W3C//DTD HTML 3.2 Final//EN">
<title>The Weblodium</title></head>

<frameset ROWS="15%,*" BORDER=3 frameborder="1" BORDERCOLOR="#000000">
	<frame SRC="top1.html" scrolling="no"/>

	</frameset><frameset COLS="*,15%" BORDER=3 frameborder="1" BORDERCOLOR="#000000">			 
		</frameset><frameset rows="15%, *,15%" BORDER=3 frameborder="1" BORDERCOLOR="#000000">	
			<frame SRC="top2.html"/>
			</frameset><frameset COLS="15%, *" BORDER=3 frameborder="1" BORDERCOLOR="#000000">	
				<frame SRC="left1.html"/>
					</frameset><frameset COLS="*,15%" BORDER=3 frameborder="1" BORDERCOLOR="#000000">			 
						</frameset><frameset rows="*,15%" BORDER=3 frameborder="1" BORDERCOLOR="#000000">	
							</frameset><frameset COLS="15%, *" BORDER=3 frameborder="1" BORDERCOLOR="#000000">	
								<frame SRC="left2.html"/>
								</frameset><frameset rows="20%, *, 20%" BORDER=3 frameborder="1" BORDERCOLOR="#000000">	
									<frame SRC="top3.html"/>

									</frameset><frameset COLS="20%, *" BORDER=3 frameborder="1" BORDERCOLOR="#000000">	
										<frame SRC="left3.html"/>

											</frameset><frameset COLS="*,25%" BORDER=3 frameborder="1" BORDERCOLOR="#000000">			 

												</frameset><frameset rows="*,30%" BORDER=3 frameborder="1" BORDERCOLOR="#000000">	
													</frameset><frameset COLS="25%, *, 25%" BORDER=3 frameborder="1" BORDERCOLOR="#000000">	
														<frame SRC="left4.html"/>
														<frame SRC="dog.html"/>
														<frame SRC="right4.html"/>	
													<frame NAME="bottom5" SRC="bottom5.html"/>
												<frame SRC="right3.html"/>

									<frame SRC="bottom4.html"/>
							<frame SRC="bottom3.html"/>
						<frame SRC="right2.html"/>
			<frame NAME="bottom2" SRC="bottom2.html"/>
		<frame NAME="right1" SRC="right1.html"/>

<h2 align=center>NOTE: This site uses old school HTML frames, but apparently your 
browser does not support this 1990s feature. Try the 
<a href="noframes.html">sad dull alternative</a>.</h2>

Each frame source page I made so the entire frame is clickable, and when activated it changes it’s background color and text color of an H1 title, plus it starts (or stops) a looping sound file.

Stop reading and try it out now–

The structure of each frame source is about the same- it uses an external stylesheet and some jQuery to make the action work. Let’s breakdown the one second in form the right:


<link href="style.css" rel="stylesheet"/>
h1 {padding: 110% 0;}
<link rel="stylesheet" href="font-awesome/css/font-awesome.min.css"/>

An external stylesheet style.css has commonly used CSS; the style tag below is to override the main stylesheet for the headings- they need different amounts of top padding depending on which frame it is.

Not also a style sheet link to the Font Awesome CSS – this is a slick way yo have icons in your site that are actually a font and not a graphic (hence are smaller and has a few other tricks)

<div id="container">
<h1><i class="fa fa-cubes"></i></h1>

<audio loop id="instrument" src="audio/happy_to_be_slapping_bass.mp3"></audio>

This is really the entire content. The container div wraps everything; it’s CSS is sized to fill the frame and have a hand cursor when mouseovered. The stuff inside the H1 tag is how you put in this case, an image of some cubes from the Font Awesome library (see the examples for ideas what is possible with this code).

The last thing is the audio tag with it’s src attribute linking to the sound file which will be played. By not including controls in the tag, we had the audio player start/stop buttons (we will do this via JavaScript), plus we do add the loop parameter so it plays continuously until the frame is clicked again to stop.

    <!-- jQuery -->
    <script src="jquery.min.js"></script>
    $bcolors = ['HoneyDew', 'DarkSlateGray'];
    $tcolors = ['DarkSlateGray', 'White'];
    $bstate = 0;
    $(document).ready(function() {
    	$('#container').css('background-color',  $bcolors[0]);
    	$('h1').css('color',  $tcolors[0]); 
    	$("#container").click(function() {
    		$bstate = ($bstate == 0) ? 1 : 0;
    		$('#container').css('background-color',  $bcolors[ $bstate]); 
    		$('h1').css('color',  $tcolors[ $bstate]); 
    		if ($bstate == 1) {
    		} else {

All of the work is done with jQuery. We have an array of background colors ($bcolors) and text colors ($tcolors), and a variable $bstate, which is either 0 (the audio is not active) or 1 (the audio is active).

A click function is set for the entire #container div. The first thing we do is flip the $bstate value (if it is 0, we are turning on the item, so set it to 1). We change the background colors and the foreground h1 text according to the value of $bstate.

Lastly we either play the sound (#instrument is the audio tag ID) if it is not playing, or if it is playing, we might be shutting the lights off.

I could probably code this more cleanly, e.g. the best might be a single configuration file that would be used to swap our entirely different different sounds and button characteristics for the entire instrument. Its a tad hard coded now.

Sue me.

The sounds were grabbed really quickly from mostly Freesound and are quite ready to be retired for a better set.

For my main ds106 tilde club site, I have some bits from real pages I made in the mid 1990s:


The top GIF is something I made for ds106 as a play on the early kinds of GIFs. The background texture I used on web sites in the stone age. And the stuff at the bottom is all dynamic generated JavaScript.

<div align="center">
<script language="JavaScript">
  today = new Date();
  document.write('<font face="verdana,helvetica">');
  document.write('<img SRC="gif/clear.gif" WIDTH="1" HEIGHT="1" vspace=10/>');
  document.write('<img SRC="gif/clear.gif" WIDTH="1" HEIGHT="1" hspace=15/>');
  document.write('Finally, according to my IndiGloWebWatch&reg;, it is now </font><font face="verdana,helvetica" color=teal><b>');
  document.write(today.toLocaleString() );
  document.write('</b></font><font face="verdana,helvetica"> (Did you <i>really</i> need a web browser to tell you that?)  ');
  document.write(' Furthermore, you are visitor number:</font><font face="verdana,helvetica" size=+3 color=red><tt><b>');
  document.write('<center><img SRC="gif/clear.gif" WIDTH="1" HEIGHT="1" vspace=10/>');
  document.write( Math.floor( today.getSeconds() * today.getTime() * Math.sqrt(today.getMinutes() ) ));
  document.write('</center></b></tt></font><font face="verdana,helvetica"><img SRC="gif/clear.gif" WIDTH="1" HEIGHT="1" vspace=10/> since <b>April 1963.</b> Do you believe that? Why not? </font>');
  document.write('<font face="verdana,helvetica" color=gray>because of my own hokey </font><font face="verdana,helvetica" color=gray>javascript</font>');
  document.write('<img SRC="gif/clear.gif" WIDTH="1" HEIGHT="1" vspace=20/>');

And that’s what we do in, we enjoy the sounds of the musical Weblodium.

The post "Playing in ~ With The Weblodium" was originally pulled from under moldy cheese at the back of the fridge at CogDogBlog ( on March 29, 2015.

No comments yet.

Leave a Comment

All fields are required. Your email address will not be published.