Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9268345
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T14:47:17+00:00 2026-06-18T14:47:17+00:00

this is what I have <html> <head> </head> <body> <iframe id=myiframe> <form id= myform

  • 0

this is what I have

    <html>
    <head>
    </head>
    <body>
    <iframe id="myiframe">
    <form id= "myform" action="submit.php" method="POST">
    <input type="submit">
    </form></iframe>
    <div id="hiddendiv" style="display:none">
    some text
    </div>
    </body></html>

and this is what I want to end up with after the form in the iframe is submitted (ether by enter or just clicking the button submit, I do not care because the form only has 1 field)

    <html>
    <head>
    </head>
    <body>
    //I want this iframe to become display:none or to be deleted
    /*<iframe id="myiframe">
    <form id= "myform" action="submit.php" method="POST">
    <input type="submit">
    </form></iframe>*/
    //and this div to be showed
    <div id="hiddendiv" style="display:">
    some text
    </div>
    </body></html>

can anyone please help, thanks

i have the answare but I have to wait for 8 h to post is so I edited the initial question, you can pot is if you want so I can validate it as a answare

got it

<html>
<head>
</head>
<body>
<script>

function closeIframe() {
var iframe = document.getElementById('myiframe');
iframe.parentNode.removeChild(iframe);
document.getElementById("hiddendiv").style.display="";
}

</script>
<iframe id="myiframe">
<form id= "myform" action="submit.php" method="POST">
<input type="submit">
</form></iframe>
<div id="hiddendiv" style="display:none">
some text
</div>
</body></html>

and in the submit.php the return is this

echo '<script type="text/javascript">';
echo 'parent.closeIframe()';
echo '</script>';
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T14:47:18+00:00Added an answer on June 18, 2026 at 2:47 pm
    <html>
    <head>
    </head>
    <body>
    <script>
    
    function closeIframe() {
    var iframe = document.getElementById('myiframe');
    iframe.parentNode.removeChild(iframe);
    document.getElementById("hiddendiv").style.display="";
    }
    
    </script>
    <iframe id="myiframe">
    <form id= "myform" action="submit.php" method="POST">
    <input type="submit">
    </form></iframe>
    <div id="hiddendiv" style="display:none">
    some text
    </div>
    </body></html>
    

    and in the submit.php the return is this

    echo '<script type="text/javascript">';
    echo 'parent.closeIframe()';
    echo '</script>';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following html: <html> <head></head> <body> <form> <input id=msg type=text value=oldValue />
I have a iframe like this <iframe name=myframe1 id=myframe1 width=100% height=100% src=a.html> <html> <head></head>
I have a string which looks like: <html><head><title>example</title></head><body>some example text</body></html> I get this string
I have this html code <html> <head> <title>JQuery Problem 2</title> <script type=text/javascript src=jquery-1.4.min.js></script> <script
OK i have this code HTML: <html> <head> <script type=text/javascript src=http://code.jquery.com/jquery-1.7.1.min.js> </script> <script type=text/javascript>
I have this script in the head of my index.html. I want different scripts
I have a html like this: <html> <head> <link rel=stylesheet type=text/css media=all href=style.css> </head>
I have this code <html> <head> <script src=jquery-1.7.2.min.js type=text/javascript></script> <script src=jquery-ui-1.8.20.custom.min.js type=text/javascript></script> <script type
I have this Haml view: !!! strict %html{:xmlns => http://www.w3.org/1999/xhtml} %head %meta{:content => text/html;
Ok, I have this code: <html> <head> <script type=text/javascript src=http://code.jquery.com/jquery-1.7.1.min.js></script> <script type=text/javascript> function get()

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.