/    Sign up×
Community /Pin to ProfileBookmark

Problem with form visibility

Hello ,
i have a problem with form.
i want submit a form to page that appear in iframe in the same page.
and this ifram have to appear instead of the form it self.
simple example here in [url]www.tinypic.com[/url]
when you upload the image the action page appear instead of the form.
i used this code

[CODE]
<html>

<script language=”javascript”>
function toggleFRAME(id)
{
var div = document.getElementById(id);

div.style.display = “block”;
div.innerHTML=”<iframe name=’IFRAMENAME’ src=’PAGENAME.PHP’></iframe>”;
}
</script>

<body>

<form method=”POST” action=”PAGENAME.PHP” target=”IFRAMENAME”>
<input type=”text” name=”USERINPUT” id=”SOME_INPUT” value=””>
<br />
<input type=”submit” value=”SUBMITTED” name=”SUBMIT” id=”THIS_IS_SUBMITTING” onclick=”javascript:toggleFRAME(‘divID’);”>
</form>

<div id=”divID”></div>

</body>

</html>
[/CODE]

when i used this code the iframe appear but its appear next of the form.
that mean the form steal in the page.
any want can help me in this issue?
thank you

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @Dr-Neo spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...