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. help on popup window

help on popup window

Scheduled Pinned Locked Moved ASP.NET
help
8 Posts 5 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.
  • S Offline
    S Offline
    S Aijaz
    wrote on last edited by
    #1

    i have a popup window with ok button. on parent window i have getValue button. when i click on get value button popup window is shown. on ok button click of popup window i want the values of the text box to be asigned to the textbox in parent window. popup window is a user control. and i use this user control with many pages. please help

    A B S T 4 Replies Last reply
    0
    • S S Aijaz

      i have a popup window with ok button. on parent window i have getValue button. when i click on get value button popup window is shown. on ok button click of popup window i want the values of the text box to be asigned to the textbox in parent window. popup window is a user control. and i use this user control with many pages. please help

      A Offline
      A Offline
      Arun Jacob
      wrote on last edited by
      #2

      Are you using javascript modal dialog?

      Arun Jacob http://codepronet.blogspot.com/

      S 1 Reply Last reply
      0
      • S S Aijaz

        i have a popup window with ok button. on parent window i have getValue button. when i click on get value button popup window is shown. on ok button click of popup window i want the values of the text box to be asigned to the textbox in parent window. popup window is a user control. and i use this user control with many pages. please help

        B Offline
        B Offline
        Brij
        wrote on last edited by
        #3

        There are several ways to do this,You can access the control of parent window from popup.So you can assign the value to parent window. For making it generic,Have some property in your popup usercontrol assign the id control on parent window to it and access it as you want.

        Cheers!! Brij Check my latest Article :Exploring ASP.NET Validators

        S 1 Reply Last reply
        0
        • S S Aijaz

          i have a popup window with ok button. on parent window i have getValue button. when i click on get value button popup window is shown. on ok button click of popup window i want the values of the text box to be asigned to the textbox in parent window. popup window is a user control. and i use this user control with many pages. please help

          S Offline
          S Offline
          Sandesh M Patil
          wrote on last edited by
          #4

          on parent page

          </pre>

          on your user control

          <pre>
          <script language="javascript">

          function GetTextboxValue(val)

          {

          // hardcoded value used to minimize the code. 
          
          // ControlID can instead be passed as query string to the popup window
          
          window.opener.document.getElementById("ctl00\_ContentPlaceHolder1\_TextBox2").value = val; 
          
          window.close();
          

          }

          1 Reply Last reply
          0
          • A Arun Jacob

            Are you using javascript modal dialog?

            Arun Jacob http://codepronet.blogspot.com/

            S Offline
            S Offline
            S Aijaz
            wrote on last edited by
            #5

            im using modal popup of the ajax controls......

            1 Reply Last reply
            0
            • B Brij

              There are several ways to do this,You can access the control of parent window from popup.So you can assign the value to parent window. For making it generic,Have some property in your popup usercontrol assign the id control on parent window to it and access it as you want.

              Cheers!! Brij Check my latest Article :Exploring ASP.NET Validators

              S Offline
              S Offline
              S Aijaz
              wrote on last edited by
              #6

              in windows what we do if we display a popup window with showdialog() method, after returning control to parent window code starts execution from there so it becomes easy to asign the value of popup window controls to parent window controls. how to do it here in web

              B 1 Reply Last reply
              0
              • S S Aijaz

                in windows what we do if we display a popup window with showdialog() method, after returning control to parent window code starts execution from there so it becomes easy to asign the value of popup window controls to parent window controls. how to do it here in web

                B Offline
                B Offline
                Brij
                wrote on last edited by
                #7

                On click of OK button of your popup window you can pass the value in parent control from popup itself

                Cheers!! Brij Check my latest Article :Exploring ASP.NET Validators

                1 Reply Last reply
                0
                • S S Aijaz

                  i have a popup window with ok button. on parent window i have getValue button. when i click on get value button popup window is shown. on ok button click of popup window i want the values of the text box to be asigned to the textbox in parent window. popup window is a user control. and i use this user control with many pages. please help

                  T Offline
                  T Offline
                  T M Gray
                  wrote on last edited by
                  #8

                  Your user control should expose an event. Each page that uses the user control should listen for that event and in the handler for it set whatever values you need set.

                  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