vurentjie
Joined: 25 May 2008 Posts: 6
|
Posted: Thu Jun 26, 2008 11:32 am Post subject: check if object created? |
|
|
hi,
i am having a bit of a problem with a call to setInterval on a page,
it seems to be because of the mysql queries run,
if i just run a regular query that calls the data from tables, the script works fine,
but if i first save data then request it after it has been saved, it seems like the objects don't get created before the setInterval is called, at least this is what i am guessing at,
i have thought of moving some of my mysql updates to another page and then redirecting, but this is not the ideal solution, so i was wondering
if i have say a <input type='hidden' value='dfdf' id='mmm'/>
is there any way i could check if this object exists before declaring
var soso = document.getElementById('mmm').value;
something like
if(!document.getElementById('mmm')){} |
|