PDA

View Full Version : document object undefined


Shaft
06-24-2005, 04:31 PM
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>

document.getElementById("Row1").style.display == 'none'

why doesn't this piece of code work. I'm getting an error saying that document is undefined.

BaldEagle
06-24-2005, 07:34 PM
document.getElementById("Row1").style.display == 'none'

I am not exactly sure what the error is , but I suspect it is related to the use of == which is not an assignment operator. Just use =

Baldeagle

nikkiH
06-24-2005, 10:01 PM
This is posted to ASP, which implies server-side most of the time, but this looks like client-side code that should be in the javascript forum...
Is this on the server, or the client?

And the thing with the ==.

miranda
06-26-2005, 04:37 PM
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="1252"%>

document.getElementById("Row1").style.display == 'none'

why doesn't this piece of code work. I'm getting an error saying that document is undefined.

document is client side not server side. Look up the JScript reference on MSDN (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/js56jslrfjscriptlanguagereference.asp)

This can be downloaded from MSDN here (http://www.microsoft.com/downloads/details.aspx?FamilyID=8ab2ee94-e682-4597-94f9-55a29ecfe8d1&DisplayLang=en)