Hi All, i am veera. i have one hidden div which has ok and cancel button. i have kept this in showmydiv.html file. i have another file called upload.html which has one button to upload a file. on onclick of upload-button(onclick=confirmsubmit(); )..in this confirmsubmit(), i am calling another function to enable hidden div in javascript. like
confirmsubmit()
{
var x=showmydiv(divid);
alert("div popup");
.........
.........
}
when i click on the upload button, i am able to get the div visible but the problem is the flow of execution does not stoped till click ok or cancel in div popup.
i would like to stop the flow till click either ok or cancel.when i click ok or cancel then the next statement (ex:alet("div popup"); ) has to execute.
when i click on OK it has to come back to called place with return true and cancel has to return false....please help me..
Thank you
sample code:
showmydiv.html:
<div id="dividv" class="popup">
<table border="0" height="130px" cellspacing="0" cellpadding="0" class="border-table">
<tbody style="background: #ffffff">
<tr border="0" bgcolor="#ACC6DF" height="22px">
<td align="left" valign="center" style="font-family: arial;font-size: 12px; padding-left: 5px;" id="hdMsg"> Delete
</td>
<td align="right" valign="center">
<a href="#" class="poplink" onclick="hidemydiv('divid');return false;" id="link">
<img src="delete.gif" border="0"></a></td>
</tr>
<tr>
<td style="padding-top: 15px; padding-bottom: 10px;">
<table width="100%">
<tr>
<td width="40%" style="padding-left: 10px;" align="center" >
<input id="YesBtn" type="button" name="page" style="cursor: pointer;" value="OK" class="button">
<input type="button" name="page" style="cursor: pointer;" value="Cancel" class="button" id="NoBtn">
</td>
</tr>
</table>
</td>
</tr>
</tbody>
</table>
</div>
Showdiv.js:
function showmydiv(divid)
{
var divobj = document.getElementById(divid);
divobj.style.display = "none";
return true;
// break;
}
upload.html
<td align="center" valign="top" colspan="3" style="padding-top: 10px; padding-left:10px;">
<a href="#" onClick="if (confirmSubmit()) document.config_backup_restore.submit();" id="restore-link" name="restore-link" class="button" title=""></a>
</td>
the above code is for reference...



Reply With Quote

Bookmarks