Forums
This topic is locked
Big problemo!
Posted 17 Jun 2002 17:05:50
1
has voted
17 Jun 2002 17:05:50 Tony Chronopoulos posted:
First of all, please don't kill me. I posted this msg in the javascript forum but it had only 4 views and I really need to figure this out! <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>I can't figure something out. I have a link on page 1 which links to page 2. <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
The code works fine on PC but on MAC, it won't execute the location.href part. I'm just stuck there at the 1st page. Is there another way of loading a new page in the same browser window using javascript?
Here is my code:
<pre id=code><font face=courier size=2 id=code>
<head>
<script language="JavaScript">
<!--
function french_selected() {
document.cookie = 'language=french';
window.location.href = 'site.html'
}
function english_selected() {
document.cookie = 'language=english';
this.location.href = 'site.html';
}
//-->
</script>
</head>
<body>
<a href="#" onClick="french_selected()">French version</a><br>
<a href="#" onClick="english_selected()">English version</a>
</body>
</font id=code></pre id=code>
btw: Is that the way you use cookies? heheh..
Thanks,
Tony
___________________
Lunch is on me! <img src=../images/dmxzone/forum/icon_smile_big.gif border=0 align=middle>
Replies
Replied 17 Jun 2002 17:24:44
17 Jun 2002 17:24:44 Vince Baker replied:
Does it have to be in JS?
Couldnt u use vb?
That should work.
Vinny
Couldnt u use vb?
That should work.
Vinny
Replied 17 Jun 2002 17:27:06
17 Jun 2002 17:27:06 Tony Chronopoulos replied:
Sure, how about an example? <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
Thanks,
Tony
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Does it have to be in JS?
Couldnt u use vb?
That should work.
Vinny
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
___________________
Lunch is on me! <img src=../images/dmxzone/forum/icon_smile_big.gif border=0 align=middle>
Thanks,
Tony
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
Does it have to be in JS?
Couldnt u use vb?
That should work.
Vinny
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
___________________
Lunch is on me! <img src=../images/dmxzone/forum/icon_smile_big.gif border=0 align=middle>