About Me

My photo
Muthupet, TamilNadu, India
SharePoint 2010

Thursday, July 26, 2012

javascript popup window when button click

login.ascx

<asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" OnClientClick="javascript:return test(this);" />

------------------------------------------------------------

script language="javascript" type="text/javascript">
function test(obj)
{
var item = obj.id;
item = item.replace("imgedit", "hdn");
var itemid = document.getElementById(item).value;
var options = {
url:"/_Layouts/SharePointProject2/ApplicationPage1.aspx?Itemsvalue=" + itemid,
width: 600,
height: 400,
showClose:true,
title:"Edit Notes"
};
SP.UI.ModalDialog.showModalDialog(options);
return false;
}
</script>

 

No comments:

Post a Comment