/    Sign up×
Community /Pin to ProfileBookmark

form action that redirects and also makes popup

Hi, I currently have a form (method=”POST”) that loads the action page in a popup and then closes itself after 5 seconds when the user hits the submit button.

In addition to the popup I would like the original page to also redirect somewhere, I was wondering if this was possible.

Right now I have this in the header

[CODE]<SCRIPT TYPE=”text/javascript”>
<!–
function popupform(myform, windowname)
{
if (! window.focus) return true;
window.open(”, windowname, ‘height=200,width=400,scrollbars=no’);
myform.target=windowname;
return true;
}
//–>
</SCRIPT>
[/CODE]

and my <form> tag looks like this…

[CODE] <form id=”update” action=”update.php” method=”POST” name=”update” onSubmit=”popupform(this, ‘join’)”>[/CODE]

Could anyone advise?

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @JavaJam 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 5.1,
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: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

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