Click to See Complete Forum and Search --> : Identify &nbsp in safari browser


nitin.randive
June 11th, 2008, 09:35 AM
Hi Guru!
(safari user)

I am not able to go inside this code for safari browser where as it is working fine with firefox.
Pls have a look at the code..

if(document.getElementById(id).innerHTML == ' Correct')
{
// some code
}


where id -> some divId

if I alert(document.getElementById(id).innerHTML) )
I get output as "[space]Correct" in safari browser
and " Correct" in firefox which is alright to go inside the loop..

even if the "IF" loop satisfies, it is not going inside the loop only for safari browser

Why and what is the problem ??

PeejAvery
June 11th, 2008, 12:40 PM
Just like the last problem you had...why don't you use regular expressions?

nitin.randive
June 13th, 2008, 09:25 AM
yes Boss !
I got it done !
Thanks !