By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,939 Members | 1,670 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,939 IT Pros & Developers. It's quick & easy.

opening link in same webpage :-S

P: 2
hello,
here's my problem, I'm using navigationbuttons 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.html "onMouseDown="var myWindow=window.open('index.html');"> <button>home</button></a> </td>
<td><a href="paginas/nieuws.html "onMouseDown="var myWindow=window.open('paginas/nieuws.html');"> <button>nieuws</button></a></td>
<td><a href="paginas/community.html "onMouseDown="var myWindow=window.open('paginas/community.html');"> <button>community</button></a></td>
<td><a href="paginas/evenement.html "onMouseDown="var myWindow=window.open('paginas/evenement.html');"> <button>evenement</button></a></td>
<td><a href="paginas/contact.html "onMouseDown="var myWindow=window.open('paginas/contact.html');"> <button>contact</button></a></td>
<td><a href="paginas/zoeken.html "onMouseDown="var myWindow=window.open('paginas/zoeken.html');"> <button>zoeken</button></a></td>
</tr>

I'm open for any suggestions :-)

thx
Oct 17 '06 #1
Share this Question
Share on Google+
2 Replies


YenRaven
P: 29
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

P: 2
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

Post your reply

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