Groups | Blog | Home
all groups > asp.net > february 2008 >

asp.net : document.object not working


tshad
2/14/2008 11:59:45 PM
I have some code from before that worked with:

document. PictureDisplay.src="c:\\uploads\\" +
opener.document.getElementById('CompanyPicture').innerHTML;

Now it doesn't.

If I take the "document" off, it works fine:

PictureDisplay.src="c:\\uploads\\" +
opener.document.getElementById('CompanyPicture').innerHTML;

PictureDisplay is an "<img>" tag on my aspx page:

<img src="" id="PictureDisplay" alt="" />

Why doesn't the document work now?

This is VS 2005. It worked fine under VS 2003. Not sure if that is the
problem.

Thanks,

Tom


Manish
2/15/2008 2:21:00 AM
Hi Tom,

I tried to access the HTML image control in both VS2003 and VS2005 like
document.PictureDisplay.src but this is not possible. the only way to access
it is by

document.getElementById("PictureDisplay").src

Regards,
Manish

www.ComponentOne.com

[quoted text, click to view]
AddThis Social Bookmark Button