473,786 Members | 2,583 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

opening link in same webpage :-S

2 New Member
hello,
here's my problem, I'm using navigationbutto ns in html code with the tag <button> in order to use them as a link to a new website I should use Java.

I've succeeded in making the link work but here's the problem it opens in a new webpage but i want the original webpage to be replaced by the selected link.

here's a bit of my html code:
<tr>
<td><a href="index.htm l "onMouseDown="v ar myWindow=window .open('index.ht ml');"> <button>home</button></a> </td>
<td><a href="paginas/nieuws.html "onMouseDown="v ar myWindow=window .open('paginas/nieuws.html');" > <button>nieuw s</button></a></td>
<td><a href="paginas/community.html "onMouseDown="v ar myWindow=window .open('paginas/community.html' );"> <button>communi ty</button></a></td>
<td><a href="paginas/evenement.html "onMouseDown="v ar myWindow=window .open('paginas/evenement.html' );"> <button>eveneme nt</button></a></td>
<td><a href="paginas/contact.html "onMouseDown="v ar myWindow=window .open('paginas/contact.html'); "> <button>contact </button></a></td>
<td><a href="paginas/zoeken.html "onMouseDown="v ar myWindow=window .open('paginas/zoeken.html');" > <button>zoeke n</button></a></td>
</tr>

I'm open for any suggestions :-)

thx
Oct 17 '06 #1
2 2008
YenRaven
29 New Member
just need to add the parameter '_self' like below.

Expand|Select|Wrap|Line Numbers
  1. <tr>
  2. <td><a href="index.html "onMouseDown="var myWindow=window.open('index.html', '_self');"> <button>home</button></a> </td>
  3. <td><a href="paginas/nieuws.html "onMouseDown="var myWindow=window.open('paginas/nieuws.html', '_self');"> <button>nieuws</button></a></td>
  4. <td><a href="paginas/community.html "onMouseDown="var myWindow=window.open('paginas/community.html', '_self');"> <button>community</button></a></td>
  5. <td><a href="paginas/evenement.html "onMouseDown="var myWindow=window.open('paginas/evenement.html', '_self');"> <button>evenement</button></a></td>
  6. <td><a href="paginas/contact.html "onMouseDown="var myWindow=window.open('paginas/contact.html', '_self');"> <button>contact</button></a></td>
  7. <td><a href="paginas/zoeken.html "onMouseDown="var myWindow=window.open('paginas/zoeken.html', '_self');"> <button>zoeken</button></a></td>
  8. </tr>
Oct 17 '06 #2
mick79
2 New Member
thanks for the solution YenRaven. it works.

just need to add the parameter '_self' like below.

Expand|Select|Wrap|Line Numbers
  1. <tr>
  2. <td><a href="index.html "onMouseDown="var myWindow=window.open('index.html', '_self');"> <button>home</button></a> </td>
  3. <td><a href="paginas/nieuws.html "onMouseDown="var myWindow=window.open('paginas/nieuws.html', '_self');"> <button>nieuws</button></a></td>
  4. <td><a href="paginas/community.html "onMouseDown="var myWindow=window.open('paginas/community.html', '_self');"> <button>community</button></a></td>
  5. <td><a href="paginas/evenement.html "onMouseDown="var myWindow=window.open('paginas/evenement.html', '_self');"> <button>evenement</button></a></td>
  6. <td><a href="paginas/contact.html "onMouseDown="var myWindow=window.open('paginas/contact.html', '_self');"> <button>contact</button></a></td>
  7. <td><a href="paginas/zoeken.html "onMouseDown="var myWindow=window.open('paginas/zoeken.html', '_self');"> <button>zoeken</button></a></td>
  8. </tr>
Oct 21 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

9
1557
by: Karel | last post by:
All, I am completely new to Javascript but I have read some articles and examples about opening new windows from a webpage. However I am trying to open a data file ( in html format) that is not in the server dircetories but somewhere on my unix box. What I have sofar is:
14
11097
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a window.open function? I would prefer not to create a separate HTML page. So far all I have is the basic var cwin = window.open('images/KJV-THANKS.gif', 'Thanks', 'width=243,height=420,'); cwin.focus();
1
1543
by: ton | last post by:
Hi, can someone please tell me hou to open a second webpage, I tried: Response.Redirect("WebForm1.aspx", False) but this replaces the existing page with the new one. All I want is a second page. (I write everything in VB.NET) Many Thanx
2
2100
by: Matt Hamilton | last post by:
I have an application page with a datagrid with a checkbox on each row. The user should check the rows they want to modify and then click a button. When the button is clicked, I have a Click handler that builds a url and then registers a startup script to open a modal dialog window. With XP SP2 installed the pop-up blocker stops the windows from displaying. Is there any way around this? My users are too stupid to turn off the popup blocker...
3
2138
by: Larry Bud | last post by:
Wanting to use a technology I saw for one of our apps. We have several apps that a user logs in at on the same page. The app is determined by a drop down. User credentials are checked, response.redirect to the application. The user ID is stored in a session variable which determines if the user is logged in. When the session var goes blank, the user is redirected to the login page. A header on each page checks this. Now, some...
4
1232
by: Joris De Groote | last post by:
Hi, Is it possible to open a page from an aspx page, this without changing the url in the address bar? Actually it's a PDF file. Is this possible? Thanks Joris
26
3006
by: Nospam | last post by:
I am trying to open a link in a new template window : <a onclick="windowopen('example.html','example');return false;" href="http://www.example.com" target="_blank"example link</a> such that clicking on the example link will open it in a new window in an already saved template/site/ called example.html
2
1336
by: veer | last post by:
hello expert i made a website which opens in ie6 and works fine but when i open it in ie7 it creates probleum the probleum is that i have a footer in my webpage , it automatically moves in the middle of webpage but when i open the same webpage in ie6 it opens fine please provide help
1
5678
by: ziycon | last post by:
I have a webpage, when a user clicks on the link: <a href="file:///D:\Test.avi">Test</a> The video opens with VLC which is set as the default player, the problem is that when a user clicks on the link it pops up a box saying open with vlc or save and the save option is selected by default and the remember my choice is grayed out, can anyone tell me a different way to get an avi play when clicked on in a webpage?
0
9655
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9497
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9964
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7517
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5398
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3670
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.