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. Linux, Apache, MySQL, PHP
  4. Passing variables to form in iframe

Passing variables to form in iframe

Scheduled Pinned Locked Moved Linux, Apache, MySQL, PHP
phpcsharpjavascripthtmlsysadmin
3 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.
  • K Offline
    K Offline
    Kyro Zetera
    wrote on last edited by
    #1

    Alright, I've got a small project from a guy who wants me to pass a variable from a form on one page to a form in an iframe on another. The page in the iframe uses GET to pass variables through the url. The page in the iframe is here.[^] The form on the other page takes the zip code and insurance plan choice and so should skip the entry step on this page, giving that information to the form. I'm not sure if I can just skip the entry page altogether, cause there's a link that uses the same page with the iframe. They're using wordpress as well, so the server-side code would be in PHP if I would need to use anything besides html form code and javascript. Though I can't really add any PHP code inline with the wordpress editor. If I could find the page it creates with the iframe, I could edit it directly.. If you need any more information, please ask.

    K 1 Reply Last reply
    0
    • K Kyro Zetera

      Alright, I've got a small project from a guy who wants me to pass a variable from a form on one page to a form in an iframe on another. The page in the iframe uses GET to pass variables through the url. The page in the iframe is here.[^] The form on the other page takes the zip code and insurance plan choice and so should skip the entry step on this page, giving that information to the form. I'm not sure if I can just skip the entry page altogether, cause there's a link that uses the same page with the iframe. They're using wordpress as well, so the server-side code would be in PHP if I would need to use anything besides html form code and javascript. Though I can't really add any PHP code inline with the wordpress editor. If I could find the page it creates with the iframe, I could edit it directly.. If you need any more information, please ask.

      K Offline
      K Offline
      Kyro Zetera
      wrote on last edited by
      #2

      I could probably just pass the values from the form to hidden fields on the page with the iframe, and use those fields in the url of the iframe since it's a GET method, but the only way I can think of to do that would require me to make a separate page in wordpress for this. I was trying to avoid that if anybody has any ideas, but if it's the only way, I suppose that's fine.

      N 1 Reply Last reply
      0
      • K Kyro Zetera

        I could probably just pass the values from the form to hidden fields on the page with the iframe, and use those fields in the url of the iframe since it's a GET method, but the only way I can think of to do that would require me to make a separate page in wordpress for this. I was trying to avoid that if anybody has any ideas, but if it's the only way, I suppose that's fine.

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

        Probably using a session would be the best way to do it

        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