|
-
Aug 3rd, 2007, 02:26 AM
#1
Thread Starter
Addicted Member
Problem in javascript
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
Failing to plan is Planning to fail 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|