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. JavaScript
  4. Can I pass data via window.opener to dynamic page

Can I pass data via window.opener to dynamic page

Scheduled Pinned Locked Moved JavaScript
javascripthtmlhelptutorialquestion
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.
  • U Offline
    U Offline
    User 10802325
    wrote on last edited by
    #1

    I have parent dynamic HTML page with a form and random number of input fields in which I would like to insert predefined data from child help window. I use Javascript to open child window, where I display possible values, which I send to parent window with a click. That works fine, if I have fixed field names in parent window - via window.opener.document.myFormName.Variable1.value I assign value to Variable1. But now I have random number of variables, and therefore random names. I can send the name of the variable to my child window, but don't know how to use it, to assign specific data to that variable. function Izbor(a, b) { window.opener.document.Vprasalnik.a.value = b; window.close() } b is the value, that I assign, and a is the name of the variable, that I want to assign this value to. Is this even possible? Thanks for the help, Marcel

    S 1 Reply Last reply
    0
    • U User 10802325

      I have parent dynamic HTML page with a form and random number of input fields in which I would like to insert predefined data from child help window. I use Javascript to open child window, where I display possible values, which I send to parent window with a click. That works fine, if I have fixed field names in parent window - via window.opener.document.myFormName.Variable1.value I assign value to Variable1. But now I have random number of variables, and therefore random names. I can send the name of the variable to my child window, but don't know how to use it, to assign specific data to that variable. function Izbor(a, b) { window.opener.document.Vprasalnik.a.value = b; window.close() } b is the value, that I assign, and a is the name of the variable, that I want to assign this value to. Is this even possible? Thanks for the help, Marcel

      S Offline
      S Offline
      Sunasara Imdadhusen
      wrote on last edited by
      #2

      please do not repost your question

      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