Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-11-2005, 07:47 AM   #1
Registered: Oct 2002
Location: Ayrshire, Scotland
Distribution: Suse(home) RHEL (Work)
Posts: 263

Rep: Reputation: 30
Javascript - what to use rather than window.close() then

I've got a bit of code which displays a disclaimer to a site, unless there's a cookie there to prove the user's been there already.

Just now, it opens a new window when the cookie is accepted, using:

function page()
writeCookie('comply','1',30); ('ats_index.htm');
I'd like, however, to just forward the user to the index page in the same browser window - rather than in a 'new' browser window. I presume this is easy enough if you know how(!)

Anyone know?

Old 04-11-2005, 07:53 AM   #2
Registered: Oct 2003
Location: Canada
Distribution: ArchLinux && Slackware 10.1
Posts: 298

Rep: Reputation: 30
If you want to re-direct use "location.href=''"';

Hope this helps.

Old 04-11-2005, 08:28 AM   #3
Registered: Oct 2002
Location: Ayrshire, Scotland
Distribution: Suse(home) RHEL (Work)
Posts: 263

Original Poster
Rep: Reputation: 30
Thanks Ralvez, that was exactly what I was looking for...!

You've saved a lot of time for me,



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why NOT this Tiny Window Close ? bedi-beparwah SUSE / openSUSE 2 06-19-2005 05:04 AM
X crashes when i close a window slackinblack Linux - Software 1 12-05-2004 09:32 AM
close a window with script box_l Programming 0 07-27-2004 07:57 AM
Close Mozilla window taoweijia Programming 1 12-17-2003 12:09 PM
Javascript: New Window Script trickykid Programming 1 03-22-2001 01:58 PM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:56 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration