Read on full site | Join TechSpot! (it's free) | Bookmark / Share this



'(object reference)' is null or not an object

M.J
05-15-2005, 01:05 PM
hi

i am using a code to view some pictures .. and it work fine with me ..

but..

when i use the same code to view an other set of pictures this error appears
:

'(tdiv.style.left)' is null or not an object

how can i prevent that error ..

i want to use that code more than once in my page

can u help me plz ?

**********************************************

i took my code from this link:

http://www.dynamicdrive.com/dynamicindex14/leftrightslide2.htm

RealBlackStuff
05-15-2005, 02:20 PM
That script looks rather convoluted.
On first glance, I'd say you may have to initialise i again when you use that routine a second or third time.
Alternatively, turn it into a separate javascript, e.g. slideshow.js that you can call up, using different sets of pictures.

Ad
05-15-2005, 02:20 PM
  

M.J
05-15-2005, 02:26 PM
i will try that ....

thanks 4 ur reply :)

M.J
05-17-2005, 03:31 AM
i tried what u just said but it didn't work and i still have the same problem..

**************************************************
i attach a zip file to this Thread

* test.html

(it view 1 set of pictures and it is working fine .. this code call 4 java script file)

* code1.js

* code2.js

* code3.js

* code4.js

* p1.jpg

* p2.jpg

* p3.jpg

* p4.jpg

***************************************

if i duplicate the code in the file test.html in order to have 2 set of pictures with the same animation .. i am going to have this errore :
'(tdiv.style.left)' is null or not an object

***************************************

i hope this information can help u to fix that error

RealBlackStuff
05-17-2005, 10:15 AM
When I duplicate that code, a second picture shows under the first moving lot.
The second picture does not change, it remains fixed on the red sunset.
No errors however.

My PC does not have MS Java, I uninstalled that and put Sun Java JRE 1.5.0.2 on instead.
That might be the reason.
You'll have to experiment yourself with this, I don't have the time I'm afraid.

Post a reply, see related topics & more

Tip: Download Advanced SystemCare 3 Free - Clean, Repair, Protect & Optimize your PC.



 Top Technology News

TechSpot Blog: Disable Windows automatic check for solutions after a program crashes

Weekend Open Forum: Google Chrome OS and the future of cloud computing

Tech Tip of the Week: Unearth Region-Specific Windows 7 Themes

Microsoft to showcase Natal at Gamefest in February

Microsoft and News Corp potential alliance, against the open Web

Opera 10.10 launches with Unite sharing technology

News around the web: Cell Processor, Dead In The Water

Weekend tech reading: How to run Chrome OS as a virtual machine

More Tech News

  
 Software Downloads

WinDVD 10.05 Pro 2010 (formerly WinDVD Platinum)

Opera 10.10 for Windows

Mp3tag 2.45

FinalBurner 2.15

Google Chrome 4.0.249.00 Beta

Magic DVD Creator 11.0.10.189

Dynamic Notes 3.44

More Downloads



Copyright © 1998-2009 TechSpot.com. TechSpot is a registered trademark. All Rights Reserved.