Hi,

I create a div in html and set the link in form.If i click the link the div display and
close the div using close button that it closed.But while i try to click second time,there is no effect in the script.I think the problem may happened in the script.I put the code below.

function closeDivsms(item)
{
alert(item);
if(document.getElementById ('divSendSMS').style.visibility=='visible')
{

document.getElementById ('divSendSMS').style .display ="none";
document.getElementById ('divSendSMS').style .visibility ="hidden";
}
else
{
alert('9');
document.getElementById ('divSendSMS').style .display ="none";
document.getElementById ('divSendSMS').style .visibility ="hidden";
}
}

So give a solution to me.

As well As i create another div and check the same way on the above script.But that's working while i click second time.I put the code also.

function closeDivEmail(item)
{
alert(item);
if(document.getElementById ('divSendsms').style.visibility=='visible')
{
alert("divSendSMS");
document.getElementById ('divSendSMS').style .display ="none";
document.getElementById ('divSendSMS').style .visibility ="hidden";
}
else
{
alert("divemail");
document.getElementById ('divEmail').style .display ="none";
document.getElementById ('divEmail').style .visibility ="hidden";
}
}

Thanks