/    Sign up×
Community /Pin to ProfileBookmark

Make a Web Page Close…?

Hello,
Got an easy Question for everyone…
I have a contact form…..then you click submit……it opens a new page that displays “message has been sent” then it redirects you based on this code

<script>function update(){top.location=’index.html’;}var refresh=setInterval(‘update()’,5000);</script>

My Question is how can i change this code to CLOSE the “Message Sent Page” rather than REdirecting you? Thank You for any help.

to post a comment
JavaScript

3 Comments(s)

Copy linkTweet thisAlerts:
@TheBearMayDec 12.2005 — Try changing:

var refresh=setInterval('update()',5000);

to:

var refresh=setInterval('window.close()',5000);
Copy linkTweet thisAlerts:
@Mr_JDec 12.2005 — Is the Message Sent page in a new window?
Copy linkTweet thisAlerts:
@dragonsbb16authorDec 12.2005 — I will give it a try TheBearMay....ill post the results.thanks..
×

Success!

Help @dragonsbb16 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.2,
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: @meenaratha,
tipped: article
amount: 1000 SATS,

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

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