I have the following code for the javascript modal popup.
function ShowSearchBox() {
var options = {
title: "Search Here",
width: 760,
height: 380,
url: "/_layouts/CustomSearch/SearchPage/Searchpage.aspx"
};
SP.UI.ModalDialog.showModalDialog(options);
}
This is working fine. But now i want to send parameters to the url like, "/_layouts/CustomSearch/SearchPage/Searchpage.aspx?TableName=tblName &columnName=colName"
Here tblName and colName are not the static one. those are property values. We will set at the time of deploying the webpart. So these two values should be like dynamic parameters. we should insert the variables here instead of static values? How to pass here like this.
I am calling ShowSearchBox() function in the '.js' file when ever a button is clicked like below.
$("#btnShowDialog").click(function (e) {
ShowSearchBox();
e.preventDefault();
});
How to achieve it? I searched but didn't find correct solution. This post is some what similar but i am not able to understand