/    Sign up×
Community /Pin to ProfileBookmark

JavaScript Link

Is there a javascript code that can link a user to another page besides window.open or the one where it replaces the URL? (I want it so they can click the back button)

to post a comment
JavaScript

11 Comments(s)

Copy linkTweet thisAlerts:
@gnomepowerOct 11.2003 — well for a back link;
<a href="javascript:history.back(1)">text for back link</a>[/QUOTE] not sure otherwise
Copy linkTweet thisAlerts:
@lmccord2authorOct 11.2003 — No I mean something like:

<script language=javascript>

function test() {

[b]href("http://javascript.internet.com")[/b]

}

</script>

I know the bolded line isn't correct, and thats what I need. Got something like that, thats in the code? I've seen it before.
Copy linkTweet thisAlerts:
@gnomepowerOct 11.2003 — [i]Originally posted by lmccord2 [/i]

[B](I want it so they can click the back button) [/B][/QUOTE]

hmm well you had said that so i thought I'd get it...

well anyway I dont know of that as Im not good with JS
Copy linkTweet thisAlerts:
@CharlesOct 11.2003 — [font=georgia]If you promise not to use this in making a JavaScript dependant page then you can use [font=monospace][url=http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/location.html#1194240]location.replace()[/url][/font].[/font]
Copy linkTweet thisAlerts:
@lmccord2authorOct 11.2003 — *pulls out his hair*

rofl, I still don't mean that! I need a Javascript code that will link you to another page, besides location/window.replace...
Copy linkTweet thisAlerts:
@gnomepowerOct 11.2003 — just woundering, but why not just use html for the link?
Copy linkTweet thisAlerts:
@lmccord2authorOct 11.2003 — Lol... its a long story.

Anyone have the answer to this?
Copy linkTweet thisAlerts:
@CharlesOct 11.2003 — [i]Originally posted by lmccord2 [/i]

[B]Lol... its a long story.



Anyone have the answer to this? [/B]
[/QUOTE]
[font=georgia]Not unless you give us a lot more information. Unless you explain what exactly it is that you are trying to accomplish we can't figure out what it is that you are going on about.[/font]
Copy linkTweet thisAlerts:
@lmccord2authorOct 11.2003 — Ok...

I have a JavaScript that performs a few actions, like an alert. After the alert, I want the script to send them to a new page. But I don't want window.replace because then you can click back, because window.replace replaces the page with the new one, therefore the old page is not in your back history anymore.

Got it? Its like the most simplist script ever and I can't get any help on it ? lol j/k
Copy linkTweet thisAlerts:
@CharlesOct 11.2003 — [font=monospace]<a href="http://www.w3.org/" onclick="alert('You will now be taken the the fount of all knowlege.'); window.location = this.href; return false">W3C</a>[/font]
Copy linkTweet thisAlerts:
@lmccord2authorOct 13.2003 — Not exactly how I was looking for it, but that works. Thanks, Charles.
×

Success!

Help @lmccord2 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.19,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

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