473,466 Members | 1,511 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Rollover scripts in MasterPage dont seem to work

I used Photoshop/Image Ready to create rollover buttons (for a nav menu).
They work great.

But, when I take the html, including the javascript and put it in a
MasterPage, when I view the page (based on the Master) the rollovers don't
occur. Any ideas why? Is the Javascript supposed to work even when in a
Master Page?

Here's the partial HTML for the master... The javascript was created
automatically in Image Ready, so not to much of a need to debug that. :)

<%@ Master Language="VB" CodeFile="MasterPage.master.vb"
Inherits="MasterPage" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>New Website</title>
<script type="text/javascript">
<!--

function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}

function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
}
}
}

var preloadFlag = false;
function preloadImages() {
if (document.images) {
Home_over = newImage("images_nav/Home-over.gif");
About_over = newImage("images_nav/About-over.gif");
Services_over = newImage("images_nav/Services-over.gif");
Retail_over = newImage("images_nav/Retail-over.gif");
Managed_over = newImage("images_nav/Managed-over.gif");
Faq_over = newImage("images_nav/Faq-over.gif");
Contact_over = newImage("images_nav/Contact-over.gif");
Login_over = newImage("images_nav/Login-over.gif");
preloadFlag = true;
}
}
// -->
</script>
</head>
<body bgcolor="black" leftmargin="0" topmargin="0">
<form id="form1" runat="server">
<div>
<table bgcolor="black" border="0" style="width: 750px"
bordercolor="black" cellpadding="0" cellspacing="0">
<tr>
<td style="width: 100px">
<img src="images/Header.jpg" /></td>
</tr>
<tr>
<td bgcolor="white"><table cellpadding="0" cellspacing="0"
style="width: 100%; height: 100%">
<tr>
<td style="width: 174px;">
<table id="Table_01" width="195"
height="403" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="2">
<img src="images_nav/Nav_01.gif" width="195" height="6" alt=""></td>
</tr>
<tr>
<td rowspan="11">
<img src="images_nav/Nav_02.gif" width="21" height="397" alt=""></td>
<td>
<a href="Default.aspx"
onmouseover="changeImages('Home', 'images_nav/Home-over.gif'); return
true;"
onmouseout="changeImages('Home', 'images_nav/Home.gif'); return true;"
onmousedown="changeImages('Home', 'images_nav/Home-over.gif'); return
true;"
onmouseup="changeImages('Home', 'images_nav/Home-over.gif'); return
true;">
<img name="Home" src="images_nav/Home.gif" width="174" height="23"
border="0" alt=""></a></td>
</tr>
:
:

Thanks!
Mar 24 '06 #1
0 1090

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

Similar topics

3
by: Max Biancofiore | last post by:
I am working on a website. Can everybody have a look at www.intheloop.org.uk/sw5/index.html and tell me: 1) How long do the buttons take to download. (state connection speed too). 2) How do...
3
by: Alex | last post by:
I created a page ( http://www.ayida.net/benaglia/chi.html ) based on the example B of the fixed-width layout i found here: http://builder.com.com/5100-6371-5314471-2.html the layout needs this...
4
by: down_w/spam | last post by:
Hi all, I've done some research on this issue and am looking to you for further information on why IE still does a server look-up of a rollover image, even if the image has been preloaded and/or...
4
by: Leythos | last post by:
I've got several sites that I used DreamWeaver MX to add RollOver buttons to the pages, it also adds some javascript that pre-loads the images and does the mouse_over and such. In FireFox 1.0.1...
4
by: Matt | last post by:
i know more-or-less zero about javascript, but my client wants a rollover and he created this code, which doesn't work. All comments are appreciated. 1. the tag: <td align="center" width="66"...
6
by: AJBopp | last post by:
I'm wrestling with CSS variations between Firefox and IE. I'm trying to create rollover buttons in a menu frame. It is working perfectly in Firefox but in IE only the first button is properly...
2
by: Stu | last post by:
Hi, I am migrating a large app to .Net 2 and am having problems with accessing hidden fields using javascript. As I am using masterpages the control names are prefixed with the control...
8
by: Randy Smith | last post by:
Hi, I now need to add MasterPages to a number of existing forms, but when I add the code for MasterPage, the MasterPage does NOT appear when it runs. Any thoughts? TIA, Randy Smith
6
by: =?Utf-8?B?QWxleCBNYWdoZW4=?= | last post by:
I want to insert a CSS Stylesheet file in a <LINKtag inside my MasterPage so that it will work in all of the the ASPX pages that use that MasterPage (no matter where the page is in the directory...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
agi2029
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,...
0
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...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.