lmccord2
10-11-2003, 01:02 PM
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)
|
Click to See Complete Forum and Search --> : JavaScript Link lmccord2 10-11-2003, 01:02 PM 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) gnomepower 10-11-2003, 01:18 PM well for a back link; <a href="javascript:history.back(1)">text for back link</a> not sure otherwise lmccord2 10-11-2003, 01:21 PM No I mean something like: <script language=javascript> function test() { href("http://javascript.internet.com") } </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. gnomepower 10-11-2003, 01:26 PM Originally posted by lmccord2 (I want it so they can click the back button) 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 Charles 10-11-2003, 01:31 PM If you promise not to use this in making a JavaScript dependant page then you can use location.replace() (http://devedge.netscape.com/library/manuals/2000/javascript/1.3/reference/location.html#1194240). lmccord2 10-11-2003, 01:35 PM *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... gnomepower 10-11-2003, 01:41 PM just woundering, but why not just use html for the link? lmccord2 10-11-2003, 01:42 PM Lol... its a long story. Anyone have the answer to this? Charles 10-11-2003, 01:58 PM Originally posted by lmccord2 Lol... its a long story. Anyone have the answer to this? 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. lmccord2 10-11-2003, 03:30 PM 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 :D lol j/k Charles 10-11-2003, 03:39 PM <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> lmccord2 10-13-2003, 05:06 PM Not exactly how I was looking for it, but that works. Thanks, Charles. webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |