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. getting problem in model window

getting problem in model window

Scheduled Pinned Locked Moved ASP.NET
helpquestion
8 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.
  • N Offline
    N Offline
    NidhiKanu
    wrote on last edited by
    #1

    Hi all, I am using this code on aspx page from where i open model window: function AddValue(Param) { var winSettings = 'center=yes,left=150px,top=150px,status=yes,scrollbars=yes,resizable=yes,width=300,height=300'; var Status=window.showModalDialog('/Scheduling/View/DataInput/AddPopup.aspx?Key='+Param,'',winSettings); document.getElementById('ctl00_CPHMain_hdnCheck').value=Status; document.getElementById('ctl00_CPHMain_hdnKey').value=Param; if(Status==1) { return true; } else { return false; } } and using this code on model window: function CloseWindow(returnValue) { window.returnValue =returnValue; window.close(); } calling this function for returning value while closing window: cancel Now problem is that when i click on image which is use for cancel then it close with return value 0 but at the time of saving when i click on image button for saving its looks llkes as other window is open and close after saving but this model window remains same. On mozilla its working well but on ie7 i m getting this problem

    G 1 Reply Last reply
    0
    • N NidhiKanu

      Hi all, I am using this code on aspx page from where i open model window: function AddValue(Param) { var winSettings = 'center=yes,left=150px,top=150px,status=yes,scrollbars=yes,resizable=yes,width=300,height=300'; var Status=window.showModalDialog('/Scheduling/View/DataInput/AddPopup.aspx?Key='+Param,'',winSettings); document.getElementById('ctl00_CPHMain_hdnCheck').value=Status; document.getElementById('ctl00_CPHMain_hdnKey').value=Param; if(Status==1) { return true; } else { return false; } } and using this code on model window: function CloseWindow(returnValue) { window.returnValue =returnValue; window.close(); } calling this function for returning value while closing window: cancel Now problem is that when i click on image which is use for cancel then it close with return value 0 but at the time of saving when i click on image button for saving its looks llkes as other window is open and close after saving but this model window remains same. On mozilla its working well but on ie7 i m getting this problem

      G Offline
      G Offline
      Guffa
      wrote on last edited by
      #2

      That's because you are doing a postback in a modal window. (That's "modal", not "model"...) You can't post a form to a modal window, that is why it opens in a new window. If you want a modal window and want to make a postback, open a frameset page in the modal window that contains a frame that opens the page. That of course means that the returnValue property is in the frameset page, i.e. the parent of the page in the frame.

      Despite everything, the person most likely to be fooling you next is yourself.

      N 1 Reply Last reply
      0
      • G Guffa

        That's because you are doing a postback in a modal window. (That's "modal", not "model"...) You can't post a form to a modal window, that is why it opens in a new window. If you want a modal window and want to make a postback, open a frameset page in the modal window that contains a frame that opens the page. That of course means that the returnValue property is in the frameset page, i.e. the parent of the page in the frame.

        Despite everything, the person most likely to be fooling you next is yourself.

        N Offline
        N Offline
        NidhiKanu
        wrote on last edited by
        #3

        but this problem is not occurring in mozilla,why so

        G 1 Reply Last reply
        0
        • N NidhiKanu

          but this problem is not occurring in mozilla,why so

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          I don't know, I have actually never tried a modal window in Mozilla. They probably just didn't set that limitation on modal windows.

          Despite everything, the person most likely to be fooling you next is yourself.

          N 2 Replies Last reply
          0
          • G Guffa

            I don't know, I have actually never tried a modal window in Mozilla. They probably just didn't set that limitation on modal windows.

            Despite everything, the person most likely to be fooling you next is yourself.

            N Offline
            N Offline
            NidhiKanu
            wrote on last edited by
            #5

            Thnx a lot ,using your way i got solution for this problem.

            1 Reply Last reply
            0
            • G Guffa

              I don't know, I have actually never tried a modal window in Mozilla. They probably just didn't set that limitation on modal windows.

              Despite everything, the person most likely to be fooling you next is yourself.

              N Offline
              N Offline
              NidhiKanu
              wrote on last edited by
              #6

              Hi , Could u pls help me for one more issue,when i am using iframe,i am not able to updating its properties like y code is: but still its giving scrolling

              A 1 Reply Last reply
              0
              • N NidhiKanu

                Hi , Could u pls help me for one more issue,when i am using iframe,i am not able to updating its properties like y code is: but still its giving scrolling

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

                What about height ?

                cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net

                N 1 Reply Last reply
                0
                • A Abhijit Jana

                  What about height ?

                  cheers, Abhijit CodeProject MVP My Recent Article : Exploring Session in ASP.Net

                  N Offline
                  N Offline
                  NidhiKanu
                  wrote on last edited by
                  #8

                  thnx,it working

                  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