/    Sign up×
Community /Pin to ProfileBookmark

Call URI & Refresh?

Basically I need to do something like this:

1) Call a URI as soon as the page loads
2) Refresh the page to another page for which a URI is called again
3) Be able to do that as many times as I need to

Is there really a solution out there? Its for a project my boss has requested; I defiantly would appreciate it.

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@FangOct 05.2008 — Usig the meta tag refresh.
Copy linkTweet thisAlerts:
@mokeyjoeauthorOct 05.2008 — Here is my current code and it doesn't work:

<html>

<head<meta http-equiv='refresh' content='5; url=callto01.html'></head>

<body><script type="text/javascript">

function init() {

var linkPage = document.getElementById('call').href;

window.location.href = linkPage;

}

onload = init;

</script>

</body>

<a href="callto:1234567890" id="call">call</a>

</html>
Copy linkTweet thisAlerts:
@DokOct 05.2008 — The init function will try to redirect to a page 'callto:1234567890' as soon as the page is loaded. Replace the href to a valid link or remove the init function.
Copy linkTweet thisAlerts:
@mokeyjoeauthorOct 05.2008 — The init function will try to redirect to a page 'callto:1234567890' as soon as the page is loaded. Replace the href to a valid link or remove the init function.[/QUOTE]

But if I replace the init function how would I get the link to be called when the page loads? Thats what I need it to do; call a specified uri link when the page loads but then redirect to another page soon after.

Thank you for your time.
×

Success!

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