Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > javascript mouseover problem

Thread Tools

javascript mouseover problem
Posts: n/a

i'm working on the following scripts My idea is whenever there's a
mouseover event on the series of links in one frame, the other frame
named "bookmarks" will load new content dynamically. however, when i
put the scripts into practice, some strange behavior happened. the
first time the mouse moved over "culture", it shows the related
bookmarks; but when the mouse moved on the another link eg.
"dictionary", i needed to move over it twice in order for the
"bookmarks" frame to refresh, & vice versa. can anybody help me how to

testing.js >>>>>
ie4_or_nn4 = (((navigator.appName == "Netscape") &&
(parseInt(navigator.appVersion) >= 4 ))
|| ((navigator.appName == "Microsoft Internet Explorer") &&
(parseInt(navigator.appVersion) >= 4 )))
nn3 = ((navigator.appName == "Netscape") &&
(parseInt(navigator.appVersion) == 3 ))

var activepage = ""

function showPage( bookmark ) {
if ( ie4_or_nn4 || nn3 ) {
if (activepage != bookmark) {
parent.bookmarks.location.href = 'bookmarks-main.html';
parent.bookmarks.showBookmark (bookmark);
activepage = bookmark;

function showBookmark( bookmark ) {;
document.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"css/
if (bookmark == "culture") {
document.write("<a href=\"\" target=
\"_blank\">Sound Portraits</a>");
else if (bookmark == "dictionary") {
document.write("<a href=\"\" target=
\"_blank\">Cambridge Online Dictionary</a>");

categories.html (the frame that triggers the refresh on "bookmarks"
frame) >>>>>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<META http-equiv="Content-Type" content="text/html; charset=UTF-16">
<title>: : : M A R C O : B O O K M A R K S : : :</title>
<link rel="stylesheet" type="text/css" href="css/general.css">
<SCRIPT src="js/testing.js" type=text/javascript></SCRIPT>
<a class=locallink href="javascript:void(0);"
onMouseOver="showPage('culture')" style="line-height:2; padding-left:
1em; cursor:hand; color: #999999">culture</a><br>
<a class=locallink href="javascript:void(0);"
onMouseOver="showPage('dictionary')" style="line-height:2; padding-
left: 1em; cursor:hand; color: #999999">dictionary</a><br>

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
javascript mouseover problem Javascript 0 03-10-2007 03:32 PM
how to add mouseover event to link button by using javascript? =?Utf-8?B?RGFuaWVs?= ASP .Net 3 08-10-2005 05:45 PM
Javascript Mouseover Problem richk Javascript 3 05-29-2004 01:21 PM
javascript mouseover John J Javascript 2 04-10-2004 09:45 PM
Javascript mouseover text bubble? Tony HTML 3 01-17-2004 04:01 AM