OutFront Forums
     Home    Register     Search      Help      Login    

Sponsors
Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax
Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.
Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Follow Us
On Facebook
On Twitter
RSS
Via Email

Recent Posts
Todays Posts
Most Active posts
Posts since last visit
My Recent Posts
Mark posts read

 

Getting Error on IE document.slideImage is null or not in object

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> General Web Development >> Getting Error on IE document.slideImage is null or not in object
Page: [1]
 
 
deepak_message

 

Posts: 3
Joined: 9/7/2009
Status: offline

 
Getting Error on IE document.slideImage is null or not ... - 9/7/2009 15:29:56   
Hi All,

Recently I joined this forum. I am getting problem when trying to run on IE .
getting error "document.slideImage is null or not in object ". and previous and next button not working. code is the below

Please help me.


<head>
<BODY BACKGROUND="logo2.gif">
<script language="JavaScript">

<!--
var image = new Array("1.jpg", "2.jpg", "3.jpg", "4.jpg")
var imgNumber=1
var numberOfImg = image.length

function previousImage(){
if(imgNumber > 1){
imgNumber--
}

else{
imgNumber = numberOfImg
}

document.slideImage.src = image[imgNumber-1]


}
function nextImage(){
if(imgNumber < numberOfImg){
imgNumber++
}

else{
imgNumber = 1
}

document.slideImage.src = image[imgNumber-1]




}



if(document.images){




var image1 = new Image()



image1.src = "1.jpg"



var image2 = new Image()
image2.src = "2.jpg"
var image3 = new Image()
image3.src = "3.jpg"
var image4 = new Image()
image4.src = "4.jpg"
}


//-->
</script>
</head>


<table bgcolor="#a52a2a" border="7" cellpadding="7" cellspacing="5" bordercolor="#770000" ALIGN="CENTER">
<tr><td align="center" valign="middle">
<table bgcolor="#000000" border="1" cellpadding="5" cellspacing="2" bordercolor="#770000" ALIGN="CENTER">
<tr><td align="center" valign="middle">
<img src="1.jpg" width="700" height="350" border="0" alt="ape image">
</td></tr>
<tr><td align="center" valign="middle" bgcolor="#000000">
<font size="2" color="#ffff00" face="verdana">
<a href="JavaScript:previousImage()">Previous</a>
<i><img src="logo.jpg" align="center" width="100" height="30" border="0" ></i></font>
<a href="JavaScript:nextImage()">Next</a>
</tr></table>
</td></tr></table>
<p> </p>

</body>

treetopsranch

 

Posts: 1650
From: Cottage Grove, OR, USA
Status: offline

 
RE: Getting Error on IE document.slideImage is null or ... - 9/7/2009 16:45:16   
Can you post the link of the site that you obtained that script from? Hard to tell from looking at your code. Also a link to your site would help us.

_____________________________

Don from TreeTops Ranch, Oregon

"I've got a taste for quality and luxury"


(in reply to deepak_message)
deepak_message

 

Posts: 3
Joined: 9/7/2009
Status: offline

 
RE: Getting Error on IE document.slideImage is null or ... - 9/8/2009 3:39:52   
I have written above code from many website, and some parts myself. so, no any exact website .
Please help me, why I am getting error.

(in reply to treetopsranch)
Tailslide

 

Posts: 6757
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: Getting Error on IE document.slideImage is null or ... - 9/8/2009 4:20:44   
I'm not very good at Javascript but I can't see slideImage anywhere in the page itself... I see it where you say document.slideImage.src etc and therefore surely there should be something in the HTML with an id of slideImage but I can't see it?

_____________________________

Little Blue Plane Web Design | Land Rover project

:)

(in reply to deepak_message)
deepak_message

 

Posts: 3
Joined: 9/7/2009
Status: offline

 
RE: Getting Error on IE document.slideImage is null or ... - 9/8/2009 4:33:49   
Hi treetopsranch/Tailslide,

I got some help from website, http://www.proglogic.com/learn/javascript/lesson10.php.
Please check this above url. the same code mentioned here.

Please check and suggest what should I do. I am welcoming your reply :-) :)

(in reply to Tailslide)
Tailslide

 

Posts: 6757
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: Getting Error on IE document.slideImage is null or ... - 9/8/2009 9:41:41   
Hi

Yes it looks like you're missing an id from the image tag so that you can then identify that image with the script and do things with it. So maybe add the id="slideImage" to the image tag.

Otherwise, if you're just after a slideshow script, http://www.dynamicdrive.com/new.htm has loads of nice ones either with or without the next/previous thing.

_____________________________

Little Blue Plane Web Design | Land Rover project

:)

(in reply to deepak_message)
Page:   [1]

All Forums >> Web Development >> General Web Development >> Getting Error on IE document.slideImage is null or not in object
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts