Framed page php form submission

Discussion in 'PHP' started by NewComputer, Jul 21, 2006.

  1. #1
    I am trying to accomplish something that may not be possible. I have an iframed page that I would like to have a php included contact form at the bottom of the iframe (outside of the frame). I would like to allow the consumer to fill the form while browsing the framed content and then submit BUT be able to continue searching where they were in the iframe and not have the entire page refresh and have them lose their place.

    Let me know if I am not being clear...
     
    NewComputer, Jul 21, 2006 IP
  2. giraph

    giraph Guest

    Messages:
    484
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Could you describe that a little better? You have a page with an iframe in it, and a form below the iframe? It sounds like the form should be the iframe, and not the website. Or just use regular frames. Maybe you could describe it a little better or show an example?
     
    giraph, Jul 21, 2006 IP
  3. NewComputer

    NewComputer Well-Known Member

    Messages:
    2,021
    Likes Received:
    68
    Best Answers:
    0
    Trophy Points:
    188
    #3
    The form itself will be in the page that surrounds the iframe. I just want the form to be submitted and the form data to clear without the page being refreshed because the framed page will reset upon a page refresh.
     
    NewComputer, Jul 22, 2006 IP
  4. giraph

    giraph Guest

    Messages:
    484
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You may want to use AJAX for this, you can find an AJAX form script here:

    http://www.dustindiaz.com/ajax-contact-updated/

    Another way you can do it is to have your script output the status: 204 code followed by two blank lines. This will tell the browser to not refresh the page.
     
    giraph, Jul 22, 2006 IP
  5. coderlinks

    coderlinks Peon

    Messages:
    282
    Likes Received:
    19
    Best Answers:
    0
    Trophy Points:
    0
    #5
    There are many ready-made libraries that make AJAX very easy. Check out sAJAX . Its really cool and is very easy to use.

    http://www.modernmethod.com/sajax/

    Check out the example programs at their site.

    Thomas
     
    coderlinks, Jul 22, 2006 IP