logo

Response

« Return to the main article

You are viewing this page out of context. To see it in the context it is intended please click here.

About This Page

Reply posted by Karthik on Mon 12 Jun 2006 in response to Debugging JavaScript in Your Applications

How to check for undefined object in java script?

Hi everyone,


You guys are doing a wonderful job here. I have a problem to be addressed.


My application is like this.


html page divided as 3 frames..1st frame is loaded by a template file..2nd
frame is loaded by calling a cgi inturn an exe....3rd frame is also loaded by
calling a cgi and inturn an exe..


The problem comes when i have a reference for an object in 2nd and 3rd frame in
the 1st frame. i.e. when i assign a value for the 2nd frame object even when
it's not created.


So, it throws a script error..undefined or NULL...


I would like to check for the existence of the object first, before assigning
the value to it..


Pls tell me how to check for the existence of an object say text box or
whatever..


Thanks
Karthik