473,703 Members | 2,981 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 1846
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 am learning that although I can see the HTML on the lower layer, the transparent gif layer above it...
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 for every last HTML file I have
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" name="header" /> frameset cols="20%,*,20%">
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 am facing is that, if the user moves from one text box to another using tab key, the performance...
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 one correlated to a specific area. Is there any scrip which can do this?
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 mouseover the selected row, the selected color is screwed. Until you click on the selected row once, the...
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"> <html><head><title>Server List</title></head> <frameset frameborder="1" border="1" framespacing="1" rows="10%,89%">
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 they got the script from here: http://www.javascriptkit.com/script/script2/simpleimagetrail.shtml
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.