HTML Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignHTML Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 29th, 2009, 04:54 PM
lenstar lenstar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2007
Posts: 71 lenstar User rank is Corporal (100 - 500 Reputation Level)lenstar User rank is Corporal (100 - 500 Reputation Level)lenstar User rank is Corporal (100 - 500 Reputation Level)lenstar User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 16 h 21 m 10 sec
Reputation Power: 7
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>

Reply With Quote
  #2  
Old June 29th, 2009, 05:19 PM
Akh's Avatar
Akh Akh is offline
|<.+#f@#+.&.|
Dev Shed Frequenter (2500 - 2999 posts)
 
Join Date: Mar 2002
Location: norway
Posts: 2,928 Akh User rank is General 2nd Grade (Above 100000 Reputation Level)Akh User rank is General 2nd Grade (Above 100000 Reputation Level)Akh User rank is General 2nd Grade (Above 100000 Reputation Level)Akh User rank is General 2nd Grade (Above 100000 Reputation Level)Akh User rank is General 2nd Grade (Above 100000 Reputation Level)Akh User rank is General 2nd Grade (Above 100000 Reputation Level)Akh User rank is General 2nd Grade (Above 100000 Reputation Level)Akh User rank is General 2nd Grade (Above 100000 Reputation Level)Akh User rank is General 2nd Grade (Above 100000 Reputation Level)Akh User rank is General 2nd Grade (Above 100000 Reputation Level)Akh User rank is General 2nd Grade (Above 100000 Reputation Level)Akh User rank is General 2nd Grade (Above 100000 Reputation Level)Akh User rank is General 2nd Grade (Above 100000 Reputation Level)Akh User rank is General 2nd Grade (Above 100000 Reputation Level)Akh User rank is General 2nd Grade (Above 100000 Reputation Level)Akh User rank is General 2nd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 2 Days 22 h 1 m 33 sec
Reputation Power: 1123
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>
__________________

Reply With Quote
  #3  
Old June 30th, 2009, 09:31 AM
lenstar lenstar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2007
Posts: 71 lenstar User rank is Corporal (100 - 500 Reputation Level)lenstar User rank is Corporal (100 - 500 Reputation Level)lenstar User rank is Corporal (100 - 500 Reputation Level)lenstar User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 16 h 21 m 10 sec
Reputation Power: 7
Quote:
Originally Posted by Akh
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>


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.
Comments on this post
LDHosting disagrees!

Reply With Quote
  #4  
Old June 30th, 2009, 10:23 AM
LDHosting LDHosting is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2009
Posts: 251 LDHosting User rank is First Lieutenant (10000 - 20000 Reputation Level)LDHosting User rank is First Lieutenant (10000 - 20000 Reputation Level)LDHosting User rank is First Lieutenant (10000 - 20000 Reputation Level)LDHosting User rank is First Lieutenant (10000 - 20000 Reputation Level)LDHosting User rank is First Lieutenant (10000 - 20000 Reputation Level)LDHosting User rank is First Lieutenant (10000 - 20000 Reputation Level)LDHosting User rank is First Lieutenant (10000 - 20000 Reputation Level)LDHosting User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 4 Days 4 h 31 m 15 sec
Reputation Power: 114
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.

Reply With Quote
  #5  
Old July 2nd, 2009, 06:27 AM
lenstar lenstar is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2007
Posts: 71 lenstar User rank is Corporal (100 - 500 Reputation Level)lenstar User rank is Corporal (100 - 500 Reputation Level)lenstar User rank is Corporal (100 - 500 Reputation Level)lenstar User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: 16 h 21 m 10 sec
Reputation Power: 7
Quote:
Originally Posted by LDHosting
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?


Thanks man, I got it

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignHTML Programming > Using div tags to link pages - Easy fix


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek