Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    DtD
    DtD is offline
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile [FIXED] Can't get form to post data to iframe

    For my login form, I want it to post the data to an IFRAME (which is called logingin_iframe) then the page in the IFRAME validates the login information and lets the user know wether login was successful.

    I tried:
    <form action="login.php" target="logingin_iframe" method="post">
    but it doesn't work, it just opens login.php in a new window. (It posts the info properly though)

    Here's where I define the IFRAME:
    <iframe id="logingin_iframe"></iframe>

    -----------------------

    Fixed!
    Big thanks to feras_wilson, I just needed to use name instead of id

    ~DtD
    Last edited by DtD; 01-27-2007 at 08:05 PM.

  • #2
    Regular Coder feras_wilson's Avatar
    Join Date
    Jul 2005
    Location
    Sweden
    Posts
    129
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Smile

    This is the code:
    Code:
    <html>
    
    <head>
    <meta http-equiv="Content-Language" content="sv">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Ny sida 1</title>
    </head>
    
    <body>
    
    <form method="POST" action="login.php" target="frame">
    	<p><input type="submit" value="Send Form" name="B1"></p>
    </form>
    
    <p><iframe name="frame" width="594" height="349">
    </iframe></p>
    
    <p></p>
    
    </body>
    
    </html>
    Exp:
    PHP
    .NET

  • #3
    DtD
    DtD is offline
    New to the CF scene
    Join Date
    Nov 2006
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks! It works now!

    ~DtD

  • #4
    New to the CF scene
    Join Date
    May 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Great Thanks

    Hello I was redirected to this site ,while searching for posting data to iframe.
    This was mission critical fix to our application and it was really helpful to us.

    THanks for sharing this in the forum
    thumbsup:
    Karthik R:


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •