This is a discussion on "Opening a document using javascript" within the Starting Out section. This forum, and the thread "Opening a document using javascript are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Opening a document using javascript
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Opening a document using javascript
I would like to open a new page using javascript. I have found a way to open a document in a new browser window but I would like to open the document in the current browser window instead.
Here is what I was using to open the document in a new browser: open("page_name") But is there a argument I can add to open the page in the current browser window? Thanks in advance for your help. ![]() |
|
|
|
#2
|
|||
|
|||
|
Re: Opening a document using javascript
Why do you want to do this? Will your users thank you for taking control of their browser?
What's wrong with a simple link? <a href="somePage.html">Some page</a> |
|
#3
|
|||
|
|||
|
Re: Opening a document using javascript
Because I want to trigger the page load using the onmouseover event. Couldn't work out how to use A HREF with onmouseover=""
All I actually want to do is display a couple of menu options below a button when the user places their mouse over a particular button. I'm sure there is a better way to do it if you can point me in the right direction. btw: I have since found out that this works: window.location.href="page_name" but I would still like a neater solution if you have one. Last edited by gentlefoot; Sep 14th, 2007 at 15:14. |
|
#4
|
|||
|
|||
|
Re: Opening a document using javascript
Quote:
There are lots of alternatives. Look into CSS or javascript drop-down menus. For example: http://css.maxdesign.com.au/listamatic/ More abstractly, you can always have javascript create an absolutely positioned <div> (for your menu options) onmouseover, and then destroy it onmouseout. Last edited by MikeHopley; Sep 14th, 2007 at 16:30. |
|
#5
|
|||
|
|||
|
Re: Opening a document using javascript
Quote:
Thanks for the help. I will check out those links. I figured you could do it like this but just couldn't find any good reference info and examples. Thanks again. |
|
#6
|
||||
|
||||
|
Re: Opening a document using javascript
Quote:
if you want open a new page that is the code you use, how would anything be neater?
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Asp not opening! | aspcam | Classic ASP | 2 | Jul 26th, 2007 22:38 |
| document.getElementById and document.getElementByName is not working in FF | dhineraj | JavaScript Forum | 3 | Jul 26th, 2007 20:23 |
| How do I stop this javascript document referrer page from coming up? | trakarkitekt | JavaScript Forum | 4 | Apr 4th, 2007 02:12 |
| problem with opening IE | uddin | Web Page Design | 5 | Mar 29th, 2007 15:26 |
| javascript: onChange='document.archived.submit();' problem | mameha1977 | JavaScript Forum | 3 | Jun 23rd, 2006 09:57 |