|Jean LeLoup & Bob Ponterio
We have seen how to use popup windows for glossing a text or providing feedback for student responses. These worked by opening up a new browser window for the new information. By using Dynamic HTML, we can create a controllable area within a page that can become visible or invisible, can be moved to any position, can accept new content, and generally can be dynamically modified as we wish.
Annie ate a millefeuille.
Here the layer is defined by a <span> tag and contains an image (Note that doing it this way we would use a different layer with different content for each popup.):
<span id="myLayer1" STYLE="position: absolute; left: 301px; top: 388px; visibility: hidden;"><img src="glossing-popup-mille1.jpg" /></span>
We could also use the same layer to display varying content by changing the innerHTML property of the layer onmouseover. Using this technique, a single layer would be used for all of the popups on a page. (Note that we still haven't changed the position of the layer on the page in this example, so it will always appear inthe same place.)
onmouseover="document.getElementById('myLayer1').innerHTML = '<img src=\'glossing-popup-rel1.jpg\' />';"
Annie ate a religieuse.
I won't include any details here. You need to follow the instructions provided by the company to include some code in the Head area, some in the Body area and some in any object that will be glossed. The initial setup is a bit complicated, but the instructions are clear and the utility works very well.
Tom a mangé une religieuse.
|Tom a mangé <a
onMouseover="ddrivetip('<img src=\'glossing-popup-rel1.jpg\' />','yellow', 245);";
Note the way the image needs to be coded. Also note the background color and width of the popup (both of which are optional). Be very careful to follow the pattern of double & single quotes as well as /' (back-slash quote) within text strings.
And we can use the same tool to display text feedback.
onMouseover="ddrivetip('Elle a mangé un millefeuille.' />','yellow', 245);";
As we have seen before, these popups can be attached to images. Here is an example that displays text:
And here displaying an image:
Sample gloss without text markups:
I prefer croissant for breakfast. A une religieuse is a great snack. My friends love a Paris-Brest for desert. We always get a bûche de noël for Christmas eve dinner.
A powerful utility for all sorts of popups is Tooltips, well worth its cost of about $35. More flexible for shapes, easier to combine images & text. : http://www.dyn-web.com/code/tooltips/
A bit of free code by Will Bontrager: http://www.willmaster.com/blog/css/floating-layer-at-cursor-position.php