473,407 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Open new file in current window

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!
Jul 23 '05 #1
2 6789
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/
Jul 23 '05 #2
Thanks, Randy.
You are a savior!

"Randy Webb" <hi************@aol.com> wrote in message
news:pf********************@comcast.com...
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/

Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Paul Eaton | last post by:
Hi I am developing my first asp appication (vbscript). I am storing cheques scans (in pdf format) in the file system along with the db on the server. The following code is working without...
6
by: lukeo | last post by:
I'm shelling out to an .asp (or htm) page from an application. I want to show this in a window without the address bar, etc... Is there a way I can redirect this page using javascript to a page...
6
by: Les | last post by:
Hi, I'd like to find out how to use the window.open() script in Fireworks MX. I have posted my question in the Fireworks forum but didn't get any replies. Since it's javascript, maybe someone...
1
by: billster | last post by:
Hi, I am trying to launch a new browser with the same url location as the current browser, and at the same time run some javascript. This works with <a...
7
by: Peter Aitken | last post by:
I want to include a button that has rollover effects and also is a link to a page that will open in a new window. Here's the code I am using: <A...
18
by: Roger Withnell | last post by:
I open a new window from the current window to display maps. Several maps of different sizes can be displayed. The function is given the size of the map and adjusts the window size accordingly....
3
by: Leonard | last post by:
I have a button on my web app, that opens a help html page. I use this code: HttpContext.Current.Response.Write("<script>") HttpContext.Current.Response.Write("window.open('" & sUrl & "','_new')")...
2
by: KathyB | last post by:
Hi, In the pageload of my aspx file I have the following (in both not in postback and is postback)... btnList.Attributes.Add("onclick", "window.open('Scanned.aspx', 'Serial Numbers',...
1
by: Melissa | last post by:
I have inherited an intranet ASP.NET (C#) page running on Windows 2000. The page populates a label control with some javascript to open a pop-up to a document (xls, doc, pdf, etc.). This is...
4
by: 981119 | last post by:
Hello all, First time in this forum, actually i'm no experience with javascript, i have one htm file which contains some javascript one quick question, can i add javascript to let it open with...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.