Firefox issue

  • Hari Narayanan
  • Graduate
  • Graduate
  • No Avatar
  • Joined: 07 Jun 2005
  • Posts: 100
  • Status: Offline

Post August 2nd, 2005, 10:49 pm

Hi all,

The javascript code given below (self.location.href='logout.html')
works fine in IE, but its not working in Firefox.
How to make it compatible with Firefox also ?

<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type='text/javascript'>
self.location.href='logout.html';
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</html>
  • Anonymous
  • Bot
  • No Avatar
  • Joined: 25 Feb 2008
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post August 2nd, 2005, 10:49 pm

Post August 2nd, 2005, 10:54 pm

drop the self
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type='text/javascript'>
location.href='logout.html';
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
</body>
</html>
  • Hari Narayanan
  • Graduate
  • Graduate
  • No Avatar
  • Joined: 07 Jun 2005
  • Posts: 100
  • Status: Offline

Post August 2nd, 2005, 11:01 pm

Hi Guru,

I removed the self, still its not working !

I am using it to see that once the user logs out of my site, he should not be able to go to the previous pages by clicking the browser's back button. Again it works well in IE, but not in FireFox. Any other idea ?

Post August 2nd, 2005, 11:26 pm

I've always done window.location.href.... I dont know if that will give you what you're looking for.
I'd definitely check out the W3 Javascript Dom for the Window Object If it's not in there, other objects are on the left menu, such as location. I have the main W3 JS DOM site right by the top of my favorites. It is absolutely invaluable for scripting in JS. That and Quirksmode (which I think is down right now) are perhaps the best client-side scripting resources on the internet. Bookmark them both, and go to them before you go here. More often than not they will solve your problem.

EDIT: Try using window.navigate("URL"). It might do the trick for you. Let me know.

Post August 3rd, 2005, 1:40 am

I don't ever recall having a problem with location.href in ANY browser, let alone firefox.

Post August 3rd, 2005, 8:25 am

Hari Narayanan wrote:
self.location.href='logout.html';
The self is fine, though unnecessary. Try dropping the href.
FullOfQuestions wrote:
Try using window.navigate("URL")
navigate() works in IE, but not Firefox. You never want to use that.

Post Information

  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© Unmelted Enterprises 1998-2008. Driven by phpBB © 2001-2008 phpBB Group.

 
 
 

Need a pre-made web design for your website?

Check out our templates here: Ozzu Templates

Perfect Money : Swiss approach to work with e-finance