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

M

M.J

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
 
C

Chris Leeds, MVP-FrontPage

you may want to rename the object (actually copy that block of code in the
script and rename the second block) then use the new name for your second
insertion.

as long as the names are different it'll work.

HTH

--
Chris Leeds,
Microsoft MVP-FrontPage

ContentSeed: great tool for web masters,
a fantastic convenience for site owners.
http://contentseed.com/
 
M

M.J

Re-naming the variables will take alots of time

isn't there another way ..

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

* test.html

(it view 1 set of pictures and it is working fine .. this code call
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 o
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 erro

+----------------------------------------------------------------
| Attachment filename: page.zip
|Download attachment: http://www.forum4designers.com/attachment.php?postid=938799
+----------------------------------------------------------------

-
M.
 
C

Chris Leeds, MVP-FrontPage

id doesn't take that long if you copy/ paste than use (edit/ find and
replace) after highlighting the copy.

I don't know of another way to do it. not that there isn't, it's just that
renaming the items seemed obvious to me in the past, did it and was
successful, so I didn't look any further.

HTH

--
Chris Leeds,
Microsoft MVP-FrontPage

ContentSeed: great tool for web masters,
a fantastic convenience for site owners.
http://contentseed.com/
--
M.J said:
Re-naming the variables will take alots of time

isn't there another way ..

***********************************
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


+----------------------------------------------------------------+
| Attachment filename: page.zip |
|Download attachment:
http://www.forum4designers.com/attachment.php?postid=938799 |
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top