What I have is a is two sets of images,(Weather , optical) there is about 30 images of is each set.
I have script that will rotate through the images on the main page.
The user is able to view one or the other img sets with a simple onclick
This works great in Mozilla but in IE I get the error document[...]null or not an object, line 95, char 4.
I've spent hours on this, but no luck.
javascript
noDiv() is called from the page load and the java works from there.
This problem is in my switchDiv() function, but I haven't been able to solve it.
here is the html -
<!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" xml:lang="en">
-
<head>
-
<script type="text/javascript" src="support/cookie.js"></script>
-
<script type="text/javascript" src="support/main.js"></script>
-
</head>
-
<body onload="noDiv()">
-
<div id="navtrail2">
-
<span onclick="switchDiv('weather_pic')"> Weather Pictures</span> :
-
<span onclick="switchDiv('optical_pic')"> Optical Pictures</span>
-
</div>
-
<!-- Start right Column box -->
-
<div id="righcolbox">
-
<div id="weather_pic">
-
<img height="385px" width="385px" align="right" border="3" id="id_weather" src="img/revised/1.png" alt="Weather Images" />
-
</div>
-
<div id="optical_pic">
-
<img height="385px" width="385px" align="right" border="3" id="id_optical" src="img/Optics/1.jpg" alt="Optical Images" />
-
</div>
-
-
<!-- End right Column box -->
-
</div>
-
</body>
-
</html>
-
could someone help with this?
Aug 21 '07
11 2154
Ok, give me some credit. I had it at .png, I changed it because that wouldn't work. I want to use .png images so I'll play with it until I figure it out.
thanks for the help
pbmods 5,821
Recognized Expert Expert
Heya, BD.
lol I figured. I had to point it out, though, because in your OP, one set was .jpg, while the other was .png.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Winfried Koenig |
last post by:
Hi everyone,
I have a main page:
--------------------------------------------------
<html><head><title>Test</title>
</head><body>
<img id="img_a" name="img_a" src="image_1.png" alt=""><br>
|
by: Chris |
last post by:
Heres my problem:
<a href="javascript:void(document.buysell.submit())" target="_parent"
onMouseOver="MM_swapImage('members','','images/membersf2.gif',1)"
onMouseOut="MM_swapImgRestore()"><img src="images/members.gif"
alt="Back to members page" name="members" width="270" height="25"
border="0"></a>
I get the error "document.buysell" is null or not an object, but my
form name is buysell and when using the submit button, which is not
|
by: Aaron |
last post by:
Hi,
I've seen javascript code where a constructor function is passed an argument
"document", and inside the function itself the assignment "this.document =
document;" is made. This is the code (or the part necessary for the
example):
function ToggleButton(document) {
ToggleButton.images = new Array(4);
for(i=0;i<4;i++) {
ToggleButton.images = new
|
by: John |
last post by:
I am rotating images at one location of my web site. My problem is if
I set the width and height of the new image before I show the new
image, the old image is stretched first to the new image dimensions,
and if I show the new image before setting its dimensions, the new
image is stretched first to the old image dimension before it is
adjusted to its own dimension.
I would like to load a new image with its own dimension at the same
time....
|
by: Sandy Bremmer |
last post by:
I have seen many Javascripts that rotate images with each load or
refresh of the page but so far all I've found require hard coding the
image filename into the script. Does anyone know of a script that
pulls images randomly from a directory? Thus I would need only add
(or delete) images from that directory and they would display on the
web page respectively. All the images are the same size (90x90) but
there are hundreds so hard coding...
| |
by: Matt Kruse |
last post by:
http://www.JavascriptToolbox.com/bestpractices/
I started writing this up as a guide for some people who were looking for
general tips on how to do things the 'right way' with Javascript. Their code
was littered with document.all and eval, for example, and I wanted to create
a practical list of best practices that they could easily put to use.
The above URL is version 1.0 (draft) that resulted. IMO, it is not a
replacement for the FAQ,...
|
by: bdbeames |
last post by:
Could someone help with this?
I currently have a rotating picture that I have on our website's main page.
This week we decided to add another set of pictures for users to view. The users can switch between the two different picture sets by a simple onclick where I change the picture sets.
I started to modify my existing code and ran into the problem where the img within a div is not loading in IE, it works fine in Mozilla but in IE I...
|
by: AC |
last post by:
I had a page that does some event setup on window.onload:
function prepEvents()
{
document.getElementById("menumap_sales").onmouseover =
swapMenuSales;
// etc
}
window.onload = prepEvents;
|
by: ankit1999 |
last post by:
I have a problem,
everytime i'm run this page
http://click2travel.in/index.php
i get the this error,,,
|
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: 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 most users, this new feature is actually very convenient. If you want to control the update process,...
| |
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: 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 launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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: 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: 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...
| |