473,545 Members | 2,056 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

trying to use mouse effect script in multiple frames?

I have my own website and i want to use a mouse effect.
My problem is that i use frames and when i put the javascript in the index.html like this:


<meta name="keywords" content="vacati on">
<meta name="GENERATOR " content="Micros oft FrontPage 5.0">
<meta name="ProgId" content="FrontP age.Editor.Docu ment">
<title>Vacation </title>

<SCRIPT LANGUAGE="JavaS cript1.2">
<!-- Begin
var brOK = false, mie = false;
if (document.layer s || document.all) brOK = true;
if (document.all) mie = true;
var ex = 0, ey = 0;
var ae, le, re, x0, y0, tid, realx, realy;
function navMove(e) {
ex = e.pageX;
ey = e.pageY;
return routeEvent(e);
function mieMove() {
ex = document.body.s crollLeft + event.x;
ey = document.body.s crollTop + event.y;
function moveeye() {
dy = ey - y0 - 20;
dx1 = ex - x0 - 20;
dx2 = ex - x0 - 60;
r = Math.sqrt(dx1 * dx1 + dy * dy);
if (r < 20) r = 20;
dx1 = dx1 * 10 / r + x0 + 10;
dy1 = dy * 10 / r + y0 + 10;
r = Math.sqrt(dx2 * dx2 + dy * dy);
if (r < 20) r = 20;
dx2 = dx2 * 10 / r + x0 + 50;
ae.left = x0;
ae.top = y0;
le.left = dx1;
le.top = dy1;
re.left = dx2;
re.top = dy1;
function setHandlers() {
if (!mie) {
y0 = document.eyebal ls.top;
x0 = document.eyebal ls.left;
ae = document.eyebal ls;
le = document.leftey e;
re = document.righte ye;
window.captureE vents(Event.MOU SEMOVE);
window.onMouseM ove = navMove;
else {
y0 = document.all.ey eballs.style.pi xelTop;
x0 = document.all.ey eballs.style.pi xelLeft;
ae = document.all.ey eballs.style;
le = document.all.le fteye.style;
re = document.all.ri ghteye.style;
window.document .onmousemove = mieMove;
realx = x0 + 0.1;
realy = y0 + 0.1;
function moveall() {
rx = realx + 40;
ry = realy + 40;
rx += (ex - rx) * 0.1;
ry += (ey - ry) * 0.1;
realx = rx - 40;
realy = ry - 40;
x0 = Math.round(real x);
y0 = Math.round(real y);
tid = setTimeout('mov eall()', 100);
function placeeyes(x, y) {
if (brOK) {
ex = x + 40;
ey = y + 40;
s = '<DIV ID ="dummy" STYLE="position :absolute; ' +
'top:'+y+'; left:'+x+'; width:10; height:10;"> </DIV>';
s += '<DIV ID="eyeballs" STYLE="position :absolute; ' +
'top:'+y+'; left:'+x+'; width:80; height:40;"><IM G SRC=' +
'"whites.gif " border=0></DIV>';
// remember to get the image dir correct... for both whites.gif and pupil.gif
s += '<DIV ID="lefteye" STYLE="position :absolute; ' +
'top:'+(y+10)+' ; left:'+(x+10)+' ; width:20; height:20;">' +
'<IMG SRC="pupil.gif" border=0></DIV>';
s += '<DIV ID="righteye" STYLE="position :absolute; ' +
'top:'+(y+10)+' ; left:'+(x+50)+' ; width:20; height:20;">' +
'<IMG SRC="pupil.gif" border=0></DIV>';
document.writel n(s);
function clearEyes() {
if (tid) clearTimeout(ti d);
placeeyes(200, 100);
window.onload = setHandlers;
window.onunload = clearEyes;
// End -->

<frameset rows="94,*" framespacing="0 " border="0" frameborder="0" >
<frame name="vaandel" scrolling="no" target="inhoud" src="top.html" marginwidth="0" marginheight="0 " style="word-spacing: 0; margin: 0">
<frameset cols="142,*">
<frame name="inhoud" target="hoofd" src="left.html" scrolling="auto " marginwidth="0" marginheight="0 ">
<frameset rows="*,95%">
<frameset cols="*,10%">
<frame name="datum" src="datum.html " scrolling="no" target="_self" noresize marginwidth="0" marginheight="0 ">
<frame name="tijd" scrolling="no" noresize marginwidth="0" marginheight="0 " src="tijd.html" >
<frame name="hoofd1" target="_self" src="hoofd.html ">
<body topmargin="0" leftmargin="0">

<p>Op deze pagina worden frames gebruikt, maar uw browser ondersteunt geen



I don't see the frames anymore.
I only see the mouse effect.
Where do i have to put the javascript so that it will work for all frames?
Even when i load a new html in a frame?
I mean it has to stay there as a layer over my website.

Thanks in advance...
Jul 23 '05 #1
1 1830
ids schrieb:
I have my own website and i want to use a mouse effect.
My problem is that i use frames and when i put the javascript in the index.html like this:
I don't see the frames anymore.
I only see the mouse effect.
Where do i have to put the javascript so that it will work for all frames?
Even when i load a new html in a frame?
I mean it has to stay there as a layer over my website.

It's not possible to place an element on top of frames. However, you may
use IFrames within your document.

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Catherine Lynn Smith | last post by:
I have been playing with a page design that would use a 'circular' area in the middle rather than the standard boring square box world of tables and frames. I have the design itself layed out using a couple of 'div' layers including transparent gifs in 'higher' zIndex layers to create the circular 'window' to the lower layers. But now I...
by: Larry R Harrison Jr | last post by:
I have them working now, courtesy of the link given in the prior thread--the HVMenu over at Dynamic Drive myself. http://www.dynamicdrive.com I have them working as side-bar menus, not horizontal ones on TOP of the page. I figured it out and have it working fine, except for one thing--apparently I need to insert the code for the menu...
by: Jofio | last post by:
In my frame based page, I have a hyperlink in the top frame called "header" which, when I click, should make two different pages to be loaded and displayed into two different frames, namely "thumbnails" frame and "main" frame simultaneously. My framed page is defined as follows: <frameset rows="15%,*,15%"> <frame src="headerWelcome.html"...
by: Prateek | last post by:
Hi All, I have created an ASP.NET page that basically consists of a table having text boxes in all cells. The table is created using client side java script. There are some calculations being done when user changes text in any text box and moves to the next text box. This is done in the Text Changed event in java script. The problem that I...
by: Fokke Nauta | last post by:
Hi all, I am searching for a script which does the following: I have a frameset with two pages: left and right. On the left page there is an image map. When I hover the mouse over a certain area of the image map, I want to appear an image in the right page. There are more area's on the image map. I want a specific picture to appear, each...
by: Amy | last post by:
I need some help. I have this table with alternate row colors. Class gray and class white. I have javascript that do highlight when mouseover row ... and onclick to select row and highlight it with another color. Also created a class called "Selected". You can only select a row at a time. My problem is, if a row is preselected, when...
by: Rob | last post by:
I know, I know, don't use frames. Well, I'm stuck with these frames and I'm trying to add functionality without a complete redsign. You can look at this as a nostalgic journey. Anyway, I've got the following frame structure at the top level: FRAMESET CODE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN">...
by: yerk5 | last post by:
I'm trying to make use of one of those popular scripts you see all over the web these days, where you mouse over a image or link and you get a floating preview of something before you click it. Basically, if you go to www.templatemonster.com and mouse over a template, that's the exact effect I want. So I viewed their source, and saw that...
by: Eric Layman | last post by:
Is there a way to detect a held-down button while the mouse is moving? Thanks. Posted Via Usenet.com Premium Usenet Newsgroup Services
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.