473,387 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Neverending page reloading...

Hey all:

I have a very simple script that changes an image when the user
'OnMouseOver's it. it works without a problem, but the progress bar at
the bottom of the browser window reappears with the change in image,
and never finishes or goes away. When the page initially loads the
progress bar completes and disappears.

To change to image I am re-assigning it's .src

I am new to javscript, so I apologize if this is a FAQ, but I've
googled and couldn't find an answer.

-cjl
Jul 23 '05 #1
2 1472
Charlie wrote on 29 okt 2004 in comp.lang.javascript:
I have a very simple script that changes an image when the user
'OnMouseOver's it. it works without a problem, but the progress bar at
the bottom of the browser window reappears with the change in image,
and never finishes or goes away. When the page initially loads the
progress bar completes and disappears.

To change to image I am re-assigning it's .src

I am new to javscript, so I apologize if this is a FAQ, but I've
googled and couldn't find an answer


Without the code, we cannot say. Please copy and pase your javascript code.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)

Jul 23 '05 #2
Hey:

I think I've figured it out. What I was trying to create was a tab
strip, which responds without reloading the page.

Instead or re-assiging an image '.src' dynamically, I use javascript
to change the CSS style element 'backgroundPosition' of the
appropriate DIV, and I changed my image to have all three tab states
(active, hover, inactive) spaced horizontally by an exact number of
pixels (in my case 30).

I respond to onMouseOver, onMouseOut, and onMouseDown by calling a
function that changes the background position of the element.

Example javascript:
function rollOver(tabName) {
obj = document.getElementsByTagName("div");
obj[tabName].style.backgroundPosition = '-30px opx';
}

Example HTML:
<div id="tab1" onMouseOver="rollOver('tab1')">
</div>

Example CSS:
#tab1 {
background: url(tab1.png);
background-position: 0px 0px;
height: 36px;
width: 30px;
}

This seems to work with both Mozilla and IE. I'm not sure if I'm
supposed to put calls to functions directly in the div tag, but it
works great.

Next, I'm figuring out how to alter the 'html' contents of a DIV. I've
seen how to do it with 'innerHTML', and I think I understand the DOM
child thingy, but we'll see.

-cjl
Jul 23 '05 #3

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

Similar topics

8
by: Aspersion | last post by:
I'm building an ASP page that has a lot of text and graphics. There is a calculation facility on the page. The user enters several numbers in a form and presses a button to see the calculated...
1
by: Mad Scientist Jr | last post by:
How do you get a ASP.NET page to return nothing, so the page posting form data to it doesn't reload? I have tried all combinations of the following: Response.SuppressContent = True...
3
by: Richard | last post by:
Hey there, I have a textbox and a listbox. When a user types a number in the textbox, I want to get all the records from a MS Access DB but without reloading the page. I now have something...
1
by: Alex Gurevich | last post by:
Hi, I am having very strange problem, I have Dropdownlist (DDL) with callback function for SelectedIndexChanged event on asp.net page, which is populated in codebehind Page_OnLoad page. After...
6
by: Jorge Luzarraga Castro | last post by:
Hey, hope you can help with this. I have an aspx page which contains several User Control. At the beggining there´s only one visible User Control but after working with the page additional UC...
2
by: Code Monkey | last post by:
Is it possible to update a section on a masterpage from a method on a content page? Ie; suppose I've got an area on a masterpage which is essentially a shopping cart which is displayed on...
9
by: Gummy | last post by:
Hello, I created a user control that has a ListBox and a RadioButtonList (and other stuff). The idea is that I put the user control on the ASPX page multiple times and each user control will...
9
by: paul | last post by:
Hi All, We have a small dilemma. We have the following page: http://giggsey.com/m00Cow.php (don't ask about the content) that we want to turn into an interactive application for some new intake...
5
by: henryrhenryr | last post by:
Appologies for unclear title. I don't really understand the problem I'm facing. My system: PHP 5.2.1, Win2K, Apache 2, MySQL 5 (local - problem is same on my live site running php 4.3.9, Linux,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...

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.