Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Open new file in current window

Reply
Thread Tools

Open new file in current window

 
 
Richard A. Melia
Guest
Posts: n/a
 
      04-16-2004
I have a window open, let's say index.html.
On the page I have a link that executes a javascript.
I want the javascript to open file new.html in the same window that
index.html was displayed in.
How do I do this?
Everything I try opens a new window.

I appreciate any help you can offer.
Thanks!


 
Reply With Quote
 
 
 
 
Randy Webb
Guest
Posts: n/a
 
      04-16-2004
Richard A. Melia wrote:

> I have a window open, let's say index.html.
> On the page I have a link that executes a javascript.
> I want the javascript to open file new.html in the same window that
> index.html was displayed in.
> How do I do this?
> Everything I try opens a new window.
>
> I appreciate any help you can offer.
> Thanks!
>
>


document.location.href = "new.html";

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/
 
Reply With Quote
 
 
 
 
Richard A. Melia
Guest
Posts: n/a
 
      04-16-2004
Thanks, Randy.
You are a savior!

"Randy Webb" <(E-Mail Removed)> wrote in message
news(E-Mail Removed)...
> Richard A. Melia wrote:
>
> > I have a window open, let's say index.html.
> > On the page I have a link that executes a javascript.
> > I want the javascript to open file new.html in the same window that
> > index.html was displayed in.
> > How do I do this?
> > Everything I try opens a new window.
> >
> > I appreciate any help you can offer.
> > Thanks!
> >
> >

>
> document.location.href = "new.html";
>
> --
> Randy
> Chance Favors The Prepared Mind
> comp.lang.javascript FAQ - http://jibbering.com/faq/



 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Window.Open get new tab instead of new window in FireFox Fredzidd@gmail.com Javascript 1 02-29-2008 03:06 AM
Click on a link to open it in a new window/tab WITHOUT leaving the current page chambers.anya@googlemail.com Javascript 7 09-25-2007 12:32 PM
window.open() doesn't open new Window in Opera PC HUA Javascript 2 05-19-2004 02:29 AM
Need to open a new browser window, not a new window Gordon ASP General 3 04-16-2004 10:46 PM
Please help: On list box change event open new url in current window Paul Javascript 2 10-19-2003 09:08 AM



Advertisments