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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. Web Development
  3. Sending data back to referer

Sending data back to referer

Scheduled Pinned Locked Moved Web Development
javascripttutorialquestion
2 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.
  • M Offline
    M Offline
    mtone
    wrote on last edited by
    #1

    an someone tell me how to send a value from my popup window to a text box in the referer document? I have a main page with a button that opens a window. The users clicks a button on the popup. Now I want he value fro mthe click to populate a text box on the main page. I am using javascript. Thanks

    A 1 Reply Last reply
    0
    • M mtone

      an someone tell me how to send a value from my popup window to a text box in the referer document? I have a main page with a button that opens a window. The users clicks a button on the popup. Now I want he value fro mthe click to populate a text box on the main page. I am using javascript. Thanks

      A Offline
      A Offline
      aplope
      wrote on last edited by
      #2

      On the page that will call the popup, set your link to something like this:

      <A href="javascript:calendar_window=window.open('[popup-name].aspx?formname=Form1.DueDate','calendar_window','width=210,height=188');calendar_window.focus()">
      Select New Due Date</A>

      You will need to insert a literal control onto your popup page first. In the event method that fires to show your user has selected whatever, you will need to put this string into your literal control:

      <script language='javascript'>
      window.opener.(Request.QueryString["formname"]).value = '[new value]';
      window.close();
      </script>

      Obviously, replacing the form name item and the new value item with something specific to your situation. Pegmeister

      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