I am opening a popup window from WebForm using JavaScript "window.open()" after window is opened a link button is used for the same for 'open a popup window' but the link on first popup window causing the next popup window open behind the first popup window in internet explorer, in chrome and Mozilla its working showing the last popup window on top.
First child page open successfully by the following code:
Calling(From CS file):
_hplk_inv.Attributes.Add("onclick",
"openInvoice(" & e.Row.DataItem("ticket") & "," & e.Row.DataItem("invoice_id") & "," & e.Row.DataItem("client") & "," & "'E')")
Aspx file:
function openInvoice(ticket, invoice, customerID, _type) {
var url = "../AddItem/invoiceitems.aspx?ticket=" + ticket;
if (_type == "I") {
url += "&invoice_type=" + _type;
} else {
url += "&invoice_type=";
}
url += "&invoice_id=" + invoice;
if (_type == "") {
url += "&customer_id=";
url += "&est_lead=" + customerID
} else {
url += "&customer_id=" + customerID;
url += "&est_lead="
}
url += "&cfrom=unpaidinvoicereport";
window.open(url, 'invoice' + invoice, 'status=0, tooltip=0, menubar=0, location=0, top=0, left=130, height=1000, width=1125, resizable=1, scrollbars=1');
}
After clicking on link which is on child page(open page in behind of existing) Calling from CS file:
Dim url As String = "InvoicePayments.aspx?invoice=" & lblInvoiceID.Text Dim js As String = "window.open('" & url & "','InvoicePayments','width=800,height=800,scrollbars=1,top=50,left=150,menubar=??0,toolbar=0,resizable=1');"
ScriptManager.RegisterStartupScript(Page, Me.GetType, Guid.NewGuid.ToString, js, True)
(aspx file)
function openInvoiceInfo(Itemid, InvoiceId, group, InvoiceItem, itemNumber, CustomerID, createdDate, description) {
var url = "../AddItem/SerialNumberInfo.aspx?Item=" + Itemid;
url += "&InvoiceId=" + InvoiceId;
url += "&group=" + group;
url += "&InvoiceItem=" + InvoiceItem;
url += "&itemNumber=" + itemNumber;
url += "&CustomerID=" + CustomerID;
url += "&Created=" + createdDate;
url += "&Description=" + description;
window.open(url, 'location' + Itemid, 'status=0, tooltip=0, menubar=0, location=0, top=0, left=130, height=550, width=750, resizable=1, scrollbars=1');
window.focus();
I have used Javascript to set the z-index of the child window it is not working..:-(