|
|||||||
| HTML Discussion and technical support for building, using and deploying HTML sites. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
XHTML 1.1 --> target attribute
I am in the process of developing a new site. The plan is to have the site comply with the XHTML 1.1 Recommendation. Upon validating the documents that I have, I receive the following error:
Quote:
|
|
#2
|
||||
|
||||
|
Nope. You can, however, use JavaScript to open it in a new window:
<a href="http://www.w3.org/" onclick="window.open(this.href); return false;">W3C</a>
__________________
Personal website http://www.ryanbrill.com/ Business website: http://www.infinitywebdesign.com/ TypeSpace http://www.typespace.org/ I reject your reality and substitute it with my own! |
|
#3
|
||||
|
||||
|
Also:
Code:
<a href="http://www.google.com/" onclick="target='_blank';">Google</a> |
|
#4
|
||||
|
||||
|
can u open a window using php? if so, could one do action="open.php" then have open.php open the new window and ergo, it be valid plus work for all users instead of working for 87% like JS?
__________________
Theres this thing called imperfection. Its the one thing everyones got but nobody wants. I.. HATE.. EVERYTHING ABOUT YOU! Why do.. I Love you? I HATE Everything about you! Why do I.. love you??? Everytime we lie awake... after every hit we take.. every feeling that i get.. but i haven't missed you yet. only when I stop to think about it... I.. HATE.. EVERYTHING ABOUT YOU! Why do.. I Love you? I HATE Everything about you! Why do I.. love you? |
|
#5
|
||||
|
||||
|
No, PHP runs on the server-side and hence cannot open new windows, which is an inherently client-side activity. AFAIK, the best method is pyro's, which will open a new window if JS is enabled and use the current one if it is not.
Adam
__________________
"If you’re not using valid HTML, then you haven’t created a Web page. You may have created something else, but it isn’t a Web page." - Joe Clark Do something amazing (USA) | Make Poverty History |
|
#6
|
||||
|
||||
|
Alternatively you use the eXtensibility aspect of XHTML 1.1 and reintroduce the target but it was removed for a good reason.
|
|
#7
|
||||
|
||||
|
Quote:
__________________
Thousand different paths So many sterile ends I chose the Devil's path Never shall the sun kiss my face And caress me with it's burning light For I dwell in the shadows And sleep side by side with death |
|
#8
|
||||
|
||||
|
Quote:
|
|
#9
|
||||
|
||||
|
Quote:
__________________
Thousand different paths So many sterile ends I chose the Devil's path Never shall the sun kiss my face And caress me with it's burning light For I dwell in the shadows And sleep side by side with death |
|
#10
|
|||
|
|||
|
There are some times when a new window is desirable and I recently ran across some tags from PayPal for insertion of their logo that included the target attribute. So if I wanted to include the logo I would have to alter their tags but I couldn't find an alternative in xhtml. However I believe that is only true if you validate as strict. According to what I read it will work in xhtml as transitiional. In my case the logo wasn't that important and I scrapped it.
I am surprised that this is not an option to developers using xhtml and validating strict however. There are definately times when a new window is desirable.
__________________
Tom Beach http://www.northcrafts.com |
|
#11
|
||||
|
||||
|
Quote:
Last edited by fredmv; 04-02-2004 at 12:34 PM. |
|
#12
|
|||
|
|||
|
Quote:
__________________
Tom Beach http://www.northcrafts.com |
|
#13
|
||||
|
||||
|
I can explain it visit http://www.xhtmlcoder.com/beck.htm click on one of the movie links watch the movie view the page source.
Notice I have used <embed /> find the that page address; shove the page containing the embedded QuickTime Movie through the W3C Validator and notice it validates even though <embed /> is not an official W3C element. In other words I have added a new element called <embed /> to XHTML 1.0 Strict; eXtending by using the Black Arts of EBNF and DTD hence applying eXtensibility. |
|
#14
|
|||
|
|||
|
validation error, target with anchor tag
I am in the process of converting one of my sites to xhtml1.0 strict. For the <a> tag, w3schools states that there is no difference between html and xhtml, yet several pages which use the line:
<a href="index.html" target="_top">Home Page</a> no longer validate with the error "You have used an attribute with an element that is defined not to have that attribute" yet the example given is <a href="http://www.w3schools.com" target="_blank">W3Schools</a> Does this mean that for xhtml1.0 that w3schools is incorrect ? |
|
#15
|
|||
|
|||
|
Jason,
I went though the same problem when creating my site ![]() I decided to ditch it in the long run though. IM me sometime... im interested in seeing what your working on. Bryan |
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|