The Following code is working perfectly
in .aspx page
========================================
<script type="text/javascript">
function openDialog()
{
var ur="http://google.com"
var options =
{
url: ur,
width: 800,
height: 600,
title: "Event Details",
};
SP.UI.ModalDialog.showModalDialog(options);
}
</script>
<asp:Literal ID="htm" runat="server"></asp:Literal>
in aspx.cs page I am calling the function as follows
===================================================
htm.Text = "<a href='#', onclick='openDialog()'>"
The above code is working properly
But If I pass "http://google.com" as parameter (as below) it is not working
in .aspx page
========================================
<script type="text/javascript">
function openDialog(ur)
{
var options =
{
url: ur,
width: 800,
height: 600,
title: "Event Details",
};
SP.UI.ModalDialog.showModalDialog(options);
}
</script>
<asp:Literal ID="htm" runat="server"></asp:Literal>
in aspx.cs page I am calling the function as follows
===================================================
string ur="http://Google.com"
htm.Text = "<a href='#', onclick='openDialog("+ur+")'>"
Can any one correct the