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. parent page

parent page

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
4 Posts 2 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.
  • A Offline
    A Offline
    Anonymous
    wrote on last edited by
    #1

    Hi, I've a pop up page, in this one, i get the values that i've to put into his parent page, but i don't know how to set the value in the text boxes in parent page. Can u hel me? thanks

    L 1 Reply Last reply
    0
    • A Anonymous

      Hi, I've a pop up page, in this one, i get the values that i've to put into his parent page, but i don't know how to set the value in the text boxes in parent page. Can u hel me? thanks

      L Offline
      L Offline
      LeeOvEngland
      wrote on last edited by
      #2

      Yes. you need to use the following javascript: window.opener.document.form1.txtPrice.value = YOURVALUE; You can change 'txtPrice' for the ID of the form object you want to update. NB: The form on the parent page must have its ID value set to 'form1' or whatever you wish to call it. Lee

      A 1 Reply Last reply
      0
      • L LeeOvEngland

        Yes. you need to use the following javascript: window.opener.document.form1.txtPrice.value = YOURVALUE; You can change 'txtPrice' for the ID of the form object you want to update. NB: The form on the parent page must have its ID value set to 'form1' or whatever you wish to call it. Lee

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        Thanks, I had the same page in asp, but i wanted to know if i can set the values in the code behind directly to the parent page or javascript is the only way.

        L 1 Reply Last reply
        0
        • A Anonymous

          Thanks, I had the same page in asp, but i wanted to know if i can set the values in the code behind directly to the parent page or javascript is the only way.

          L Offline
          L Offline
          LeeOvEngland
          wrote on last edited by
          #4

          I remember spending a long time looking at this. Because the code behind is run on the server you would have to post the child back to the server and setting maybe a session variable. To then get that value to the parent would mean setting up something like a HTTP handler to do a background update to the parent. It would mean a lot of coding for a simple task. It's a lot faster to use good old javascript.

          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