Open action in _self iframe?

Discussion in 'HTML & Website Design' started by Zoti Media Group, Aug 30, 2013.

  1. #1
    Hello DP.

    Can anyone tell me how can i open somesite.com/process in iframe (in my domain).
    Here is the code:

    <form name="process" id="process" method="POST" enctype="multipart/form-data" action="http://www.somesite.com/process" >
    <input type="hidden" name="script_id" value="64"/>
    Code (markup):
    When i upload a file and it redirects from my domain .com to somesite .com/process

    All i want it to open somesite . com/process in i frame.

    Thank you!!!
     
    Zoti Media Group, Aug 30, 2013 IP
  2. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #2
    Is the form in the iFrame too? That's really the answer -- put the form in the frame so it's targeting itself.

    Though this is 2013, NOT 1997, so why are you using iFrames given what a complete accessibility turd they are?
     
    deathshadow, Aug 30, 2013 IP
  3. nenen

    nenen Member

    Messages:
    91
    Likes Received:
    5
    Best Answers:
    2
    Trophy Points:
    35
    #3
    You should put the whole form code inside the iframe !!
     
    nenen, Aug 31, 2013 IP
  4. Zoti Media Group

    Zoti Media Group Notable Member

    Messages:
    1,599
    Likes Received:
    113
    Best Answers:
    2
    Trophy Points:
    265
    Digital Goods:
    2
    #4
    how to do it?
     
    Zoti Media Group, Aug 31, 2013 IP
  5. nenen

    nenen Member

    Messages:
    91
    Likes Received:
    5
    Best Answers:
    2
    Trophy Points:
    35
    #5
    Here is an example ...
    
    <iframe name="myframe" id="frame1"></iframe>
    
    <form action="http://www.somesite.com/process" method="post" target="myframe">
    <input type="submit" name="DoIt" value="DoIt">
    </form> 
    
    HTML:
    The target attribute is used with frames to specify the frame in which the form response should be rendered.

    If no frame with such a name exists, the response is rendered in a new window unless overridden by the user.

    Hope it help
     
    nenen, Aug 31, 2013 IP