Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 <Javascript> Close Window/Open Site in New Window
Index -> Graphics and Design, Web Design -> (X)HTML Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
[Gandalf]




PostPosted: Sat Jul 09, 2005 12:07 am   Post subject: <Javascript> Close Window/Open Site in New Window

Not sure if JavaScript belongs here or in the Java section, but I think its here Smile.

Does anyone know a way to close the current browser window, and open a new window with a new site? The problem is that I have a redirect url, but it adds all these annoying adds to my site, so I want the site to automatically open a new window with my real (long) site address.

Thanks for any help.
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Sat Jul 09, 2005 2:06 am   Post subject: (No subject)

code:
if (Java == Javascript)
   hell.frozen = true;


Wink
[Gandalf]




PostPosted: Sat Jul 09, 2005 8:10 pm   Post subject: (No subject)

Smile Can this be done with anything else? I asked for JavaScript though since it's probably the simplest way...

If nobody can help then I will just change my redirect url host, still...
wtd




PostPosted: Sat Jul 09, 2005 9:24 pm   Post subject: (No subject)

Use Google.
[Gandalf]




PostPosted: Sat Jul 09, 2005 10:49 pm   Post subject: (No subject)

Thanks! I em... forgot about Google. I thought it would be something more complicated Smile.

Which brings me to my next question:
How do I close the current window and load up a new one, in that order. Because I want the first window to go away, and a new one load up, but that can't happen if the first window is gone Confused.
rdrake




PostPosted: Sun Jul 10, 2005 10:57 am   Post subject: (No subject)

You can reuse the window and avoid using javascript by using the refresh meta tag. More details on that can be found here. The only way that I know of that you could use to launch a page after closing the other main one is by using a very small popup which is launched from the first page, waits a bit, then launches the second page.

Javascript wasn't even based on Java, Netscape just named it that because of the polularity Java had at the time. So I remember reading anyways.
[Gandalf]




PostPosted: Sun Jul 10, 2005 2:05 pm   Post subject: (No subject)

Alright thanks, I'll look into it. The problem was that the add would appear on any page that you went to from my site. Even if it was non-related. For now the solution I found was auto scrolling down the site whenever its loaded Smile.
Display posts from previous:   
   Index -> Graphics and Design, Web Design -> (X)HTML Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 7 Posts ]
Jump to:   


Style:  
Search: