|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Using div tags to link pages - Easy fix
As you'll guess the following code that I am currently using will open up the required page in a new window however I would like the new page to load in the current window. I've had a little look around but can't seem to find anything. Can anyone help please?
Code:
<div style = "cursor:pointer;hand" onclick = "window.open('testdocaboutus.html')" class = "txt-1">ABOUT US</div>
|
|
#2
|
||||
|
||||
|
Why not use a real link? This will work even if the visitors have javascript turned off.
If you want the whole box to be click-able just set the display property to block on the a-element Code:
<div class="txt-1"><a href="testdocaboutus.html" style="display:block;">ABOUT US</a></div> |
|
#3
|
|||
|
|||
|
Quote:
Sorry but that is not what I am looking for at all. The code I have is fine but it opens a new window. What I seek is the new page to open in the current window, nothing more. Aside from that my code is perfectly suited doe my page. |
|
#4
|
|||
|
|||
|
What Akh is suggesting does as far as I can see exactly the same as what you're asking. To change the mouse pointer you don't need javascript either. The fact that people wouldn't need javascript is just a bonus in this case.
If you really won't accept this fix, maybe this thread should be moved to the javascript section?
__________________
Quality European Web Hosting - LDHosting.com High Quality, Low Cost Web Hosting Services www.ldhosting.com Last edited by LDHosting : June 30th, 2009 at 10:29 AM. |
|
#5
|
|||
|
|||
|
Quote:
Thanks man, I got it |
![]() |
| Viewing: Dev Shed Forums > Web Design > HTML Programming > Using div tags to link pages - Easy fix |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|