Java Script Problem: Code is working fine in Mozila 3.5 But NOt Working in Mozila 2.0 & Shafari
-
Hi Guys Using .net 2.0 i build a web site in which there are some java script which will open a new popup window that code is working in IE all version & Mozila 3.5 but when i am checking in mozila 2.0 that popup window is not opning So what are issue Plz help me Java script Code <script type="text/javascript" language="javascript"> function OpenChildWindowEmail() { var sFeatures="dialogHeight: 200px;"; sFeatures += "dialogWidth: 500px;"; sFeatures += "center: no;"; sFeatures += "edge: sunken;"; sFeatures += "scroll: no;"; sFeatures += "status: yes;"; sFeatures += "resizeable: no;"; var url = 'my_share_emailfile.aspx?somevalue=12345'; var entryWindow = window.showModalDialog(url, 'ChildForm', sFeatures); window.document.getElementById('HiddenField7').value = entryWindow; // alert(entryWindow+window.document.getElementById('HiddenField7').value+" "+entryWindow+window.document.getElementById('HiddenField7')); // alert(entryWindow); if(entryWindow =="true") { //alert("Watch for CurrTime & ChildWin labels, its going to update since the new child window saved something"); //this would trigger the update panels update as the button is part of the UP window.document.getElementById('btnImgEmail').click(); } else { //No change will happen to the parent page as child page did nothing //alert("Nothing on the page will change as the new child window was cancelled"); //window.document.getElementById('btnImgEmail').click(); } } </script> On Button Click <asp:ImageButton ID="btnImgEmail" runat="server" ImageUrl="images/email_bt1.jpg" OnClientClick="OpenChildWindowEmail();" OnClick="btnImgEmail_Click" ToolTip="Email files to friends" Enabled="False" />
krishna veer singh
-
Hi Guys Using .net 2.0 i build a web site in which there are some java script which will open a new popup window that code is working in IE all version & Mozila 3.5 but when i am checking in mozila 2.0 that popup window is not opning So what are issue Plz help me Java script Code <script type="text/javascript" language="javascript"> function OpenChildWindowEmail() { var sFeatures="dialogHeight: 200px;"; sFeatures += "dialogWidth: 500px;"; sFeatures += "center: no;"; sFeatures += "edge: sunken;"; sFeatures += "scroll: no;"; sFeatures += "status: yes;"; sFeatures += "resizeable: no;"; var url = 'my_share_emailfile.aspx?somevalue=12345'; var entryWindow = window.showModalDialog(url, 'ChildForm', sFeatures); window.document.getElementById('HiddenField7').value = entryWindow; // alert(entryWindow+window.document.getElementById('HiddenField7').value+" "+entryWindow+window.document.getElementById('HiddenField7')); // alert(entryWindow); if(entryWindow =="true") { //alert("Watch for CurrTime & ChildWin labels, its going to update since the new child window saved something"); //this would trigger the update panels update as the button is part of the UP window.document.getElementById('btnImgEmail').click(); } else { //No change will happen to the parent page as child page did nothing //alert("Nothing on the page will change as the new child window was cancelled"); //window.document.getElementById('btnImgEmail').click(); } } </script> On Button Click <asp:ImageButton ID="btnImgEmail" runat="server" ImageUrl="images/email_bt1.jpg" OnClientClick="OpenChildWindowEmail();" OnClick="btnImgEmail_Click" ToolTip="Email files to friends" Enabled="False" />
krishna veer singh
use
window.open
rather thanwindow.showModalDialog
to work on every browser.Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Microsoft Bing MAP using Javascript
CLR objects in SQL Server 2005
Uncommon C# Keywords/xml> -
use
window.open
rather thanwindow.showModalDialog
to work on every browser.Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Microsoft Bing MAP using Javascript
CLR objects in SQL Server 2005
Uncommon C# Keywords/xml>I did the same but its not working Any other solution
krishna veer singh
-
I did the same but its not working Any other solution
krishna veer singh
krishnaveer wrote:
I did the same but its not working
What do you mean by not working ? aren't you able to open the popup using window.open() ?
Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.
-
I did the same but its not working Any other solution
krishna veer singh
Are you sure that window.open doesnt opens a new window ?? or you mean the window is not modal...:confused: I think modal window is not standard option, so many browser will not support this feature. :)
Abhishek Sur **Don't forget to click "Good Answer" if you like this Solution.
My Latest Articles-->** Microsoft Bing MAP using Javascript
CLR objects in SQL Server 2005
Uncommon C# Keywords/xml>