Rabu, 16 Desember 2009

JavaScript Error : Object Required

If you get this error Object Required (IE)
1 . By check object exists or not
using

if (document.getElementById('Object_id'))

or

if (document.getElementById('Object_id') == null)

or

if (document.getElementById('Object_id') == "undefined")

this 3 if stement not work but u you can solve this problem by catch error

try{
//Your Code Here
} catch (e)
{
alert("Object Not Found");
}

Tidak ada komentar:

Posting Komentar