/    Sign up×
Community /Pin to ProfileBookmark

A popup form that works without changing the whole page

I’ve seen this on Tiffany.com (after you choose a country)

they have on the bottom left a button, and when you click on it you get the form to join the mailing list. when you submit it’s processing and show you a “thank you” instead of the button, without changing the whole page.

I’m new to javascript so please be gentle, thank you in advance.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@cruzcredoauthorJul 21.2007 — *bump*
Copy linkTweet thisAlerts:
@pugs421Jul 21.2007 — [CODE]

<html>
<head>
<script type="text/javascript">
function showHide(ElementID){
var oElement = document.getElementById(ElementID);
if(oElement.style.display == 'none'){
oElement.style.display = '';
}else{
oElement.style.display = 'none';
}
}
</script>
</head>
<body>
<a href="Javascript:void(0);" onclick="showHide('divFormParent');return false;">showform</a>
<div style="position:relative;">
<div id="divFormParent" style="display:none;position:absolute;z-Index:1;">
<a href="Javascript:void(0);" onclick="showHide('divFormParent');return false;">close</a><br>
<SELECT NAME=sections size="5">
<OPTION>Web Authoring Reference</OPTION>
<OPTION>FAQ Archives</OPTION>
<OPTION>Design Elements</OPTION>
<OPTION>Tools</OPTION>
<OPTION>Feature Article</OPTION>
</SELECT>
</div>
</div>
</body>
</html>
[/CODE]
Copy linkTweet thisAlerts:
@cruzcredoauthorJul 23.2007 — Thank you for your very helpful reply!

I was busy implementing it, and I appreciate it a lot.
×

Success!

Help @cruzcredo 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.4,
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,
)...