Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Java Script Problem: Code is working fine in Mozila 3.5 But NOt Working in Mozila 2.0 & Shafari

Java Script Problem: Code is working fine in Mozila 3.5 But NOt Working in Mozila 2.0 & Shafari

Scheduled Pinned Locked Moved ASP.NET
helpannouncementcsharpjavajavascript
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    krishnaveer
    wrote on last edited by
    #1

    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

    A 1 Reply Last reply
    0
    • K krishnaveer

      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

      A Offline
      A Offline
      Abhishek Sur
      wrote on last edited by
      #2

      use window.open rather than window.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>

      K 1 Reply Last reply
      0
      • A Abhishek Sur

        use window.open rather than window.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>

        K Offline
        K Offline
        krishnaveer
        wrote on last edited by
        #3

        I did the same but its not working Any other solution

        krishna veer singh

        A A 2 Replies Last reply
        0
        • K krishnaveer

          I did the same but its not working Any other solution

          krishna veer singh

          A Offline
          A Offline
          Abhijit Jana
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • K krishnaveer

            I did the same but its not working Any other solution

            krishna veer singh

            A Offline
            A Offline
            Abhishek Sur
            wrote on last edited by
            #5

            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>

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups