473,663 Members | 2,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

trying to use mouse effect script in multiple frames?

ids
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:

<html>

<head>
<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>
</head>

<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;
moveeye()
return routeEvent(e);
}
function mieMove() {
ex = document.body.s crollLeft + event.x;
ey = document.body.s crollTop + event.y;
moveeye();
}
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;
moveall();
}
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);
moveeye();
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 -->
</script>

<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" >
</frameset>
<frame name="hoofd1" target="_self" src="hoofd.html ">
</frameset>
</frameset>
<noframes>
<body topmargin="0" leftmargin="0">

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

</body>
</noframes>
</frameset>

</html>


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 1840
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:
[alotofcode]
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.

Daniel
Jul 23 '05 #2

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

Similar topics

2
2058
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...
4
2329
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
3
1569
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%">
4
2569
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...
4
8147
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?
4
19547
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...
11
16930
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%">
1
2613
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
6
3548
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
0
8345
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8858
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8771
jinu1996
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...
0
8634
tracyyun
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...
1
6186
isladogs
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...
0
4182
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...
0
4349
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2000
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1757
bsmnconsultancy
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.