Click here to Skip to main content
15,887,585 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I used this javascript function to show popup window but it is working on firefox version 27 but when i update firefox to version 51 it is not working

-----
java script code
--------
function ShowDialog() {

var rtvalue = showModalDialog("AdmissionRegPopup.aspx", "sss", "dialogWidth:800px; dialogHeight:550px; dialogLeft:250px;");
document.getElementById("ctl00_ContentPlaceHolder1_txtreg").value = rtvalue.NameValue;

}

What I have tried:

function ShowDialog() {

var rtvalue = showModalDialog("AdmissionRegPopup.aspx", "sss", "dialogWidth:800px; dialogHeight:550px; dialogLeft:250px;");
document.getElementById("ctl00_ContentPlaceHolder1_txtreg").value = rtvalue.NameValue;

}
Posted
Updated 8-Feb-17 2:08am

1 solution

That is because that function is deprecated and has been removed for recent browsers. See Window.showModalDialog() - Web APIs | MDN[^].

For alternatives read the "See Also" section at the above link and search for "javascript showmodaldialog replacement" or "javascript showmodaldialog alternative".
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900