Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 12th, 2003, 03:38 PM
Authorized User
 
Join Date: Jun 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Alexpizzoferro
Default no target attribute in XHTML strict

How can i set a link to open in a certain frame if the target attribute does not exist in XHTML strict?

Is it because frames will be deprecated in newer versions?
But how can i, at the moment make the link work?

Thanks

Alexander.M.Pizzoferro
__________________
http://www.loghopper.com
 
Old June 12th, 2003, 03:43 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 425
Thanks: 0
Thanked 3 Times in 3 Posts
Default

You have to use JavaScript and the window.open() method.

Just for the record, it was deprecated already in HTML 4 and can't be used with HTML Strict either.

(o<
//\ =^..^=
 
Old June 22nd, 2003, 01:43 PM
Authorized User
 
Join Date: Jun 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Alexpizzoferro
Default


ok but how can i do it with javascript
i found the following:

javascript:parent.myframe.location='http://www.dynamicdrive.com'

this works but changes the contents on the frame that it is located in to be a text string representing the uri. In other words, it prints the address in the frame containing the link.
Anyone know a way round this?
 
Old June 22nd, 2003, 04:17 PM
Authorized User
 
Join Date: Jun 2003
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to Alexpizzoferro
Default

Ok i have found the solution to my problem,

<script type="text/javascript">
<!--
function link()
{
parent.Menuframe.location.href='../pages/forsale.html'
}
-->
</script>

This script used with...
<a href="javascript:link()">linktext</a>
Allows frame targeting without any side effects.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Strict Javascript newbieboobers Javascript 1 July 28th, 2008 05:23 AM
Access to attribute values from class of attribute jacob C# 1 October 28th, 2005 01:11 PM
accesing a form with Strict XHTML 1.0 furia_cross Javascript How-To 2 August 27th, 2005 09:48 AM
Option Strict kevin777 VB.NET 2002/2003 Basics 2 October 10th, 2003 11:38 PM
XHTML Strict Frame Borders Alexpizzoferro HTML Code Clinic 4 September 21st, 2003 11:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.