4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 XHTML 1.0 Transitional validation
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
Darren
Team Member



Joined: 05 Feb 2002
Posts: 549
Location: London

PostPosted: Tue Jan 14, 2003 6:24 pm (14 years, 11 months ago) Reply with QuoteBack to Top

I'm trying to validate a page to XHTML 1.0 Transitional

but get this error with the following code: document type does not allow element "a" here

Code:
<textarea rows="4" cols="70" readonly="readonly">
<a href="http://www.my_url.co.uk" target="_blank">www.my_url.co.uk</a>
</textarea>


Do I take it that you can't put links in text areas?
If so does anyone know of of an way around this, apart from the obvious of just making a table and constructing the html using the relevant character codes (like the code function on phpbb).

N.B. In case you hadn't guessed its for a piece of copy and paste code
OfflineView User's ProfileFind all posts by DarrenSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Tue Jan 14, 2003 7:05 pm (14 years, 11 months ago) Reply with QuoteBack to Top

I am pretty sure that the only way would be to type in the appropriate character codes (& &), if it is the case that in XHTML an <a> tag is not allowed in a <textarea> tag.

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Darren
Team Member



Joined: 05 Feb 2002
Posts: 549
Location: London

PostPosted: Tue Jan 14, 2003 7:07 pm (14 years, 11 months ago) Reply with QuoteBack to Top

Thats what I thought - in which case it can wait for another day Very Happy
OfflineView User's ProfileFind all posts by DarrenSend Personal MessageVisit Poster's Website
Robert Wellock
WebHelper
WebHelper


Joined: 18 Jan 2002
Posts: 61
Location: Yorkshire - UK

PostPosted: Wed Jan 15, 2003 2:32 pm (14 years, 11 months ago) Reply with QuoteBack to Top

The textarea cannot contain other XHTML 1.0 elements, plaintext yes. I would like to know what exactly you were trying to achieve, if it were purely stylistic in nature you could have used CSS to create a <div> of a given dimension which would allow scrollbars, or borders if you required them, for example:

Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>Overflow to Scroll...</title>
<style
 type="text/css">
<!--
.auto {
    border: 1px solid #ccc;
    background: #f6f6f6;
    height: 110px;
    margin: 20px;
    width: 500px;
    overflow: scroll;
    color: green;
}
-->
</style>
  </head>

  <body>
    <div
     class="auto">
      Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
      Praesent imperdiet, nunc nec cursus sagittis, diam ipsum
      mattis turpis, non blandit wisi quam ut dolor. Nullam quis
      leo vitae orci tristique commodo. Donec mauris elit, mollis
      vel, pharetra sit amet, sodales ac, nisl. Pellentesque tempus
      nisl quis sapien gravida bibendum. Integer quis libero sit
      amet odio lobortis rhoncus. Ut eu lectus. Proin augue wisi,
      semper quis, dictum vitae, fermentum nec, nibh. Vestibulum
      scelerisque, diam sed mattis mollis, elit magna aliquam sem,
      eget imperdiet felis pede at metus. Curabitur pharetra
      imperdiet augue. Duis dignissim dapibus mauris. Etiam quis
      quam ac nibh commodo porttitor.
    </div>
  </body>
</html>

________________________________
};-) http://www.xhtmlcoder.com/

Last edited by Robert Wellock on Mon May 19, 2003 4:06 pm, edited 1 time in total
OfflineView User's ProfileFind all posts by Robert WellockSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Wed Jan 15, 2003 4:20 pm (14 years, 11 months ago) Reply with QuoteBack to Top

I think you're probably right, it probably is purely stylistic: see http://www.fancy-rats.co.uk/resources/usefullinks/banners.php .

With your solution, you end up not using a textarea, but it's good all the same! Smile

________________________________
Image
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Darren
Team Member



Joined: 05 Feb 2002
Posts: 549
Location: London

PostPosted: Wed Jan 15, 2003 4:41 pm (14 years, 11 months ago) Reply with QuoteBack to Top

I was only using textarea as it displayed the HTML rather than rendering it.
I'm certainly not bothered about having scroll bars infact it'll better wioth out them.
I will have a play around with this later.
Very Happy
OfflineView User's ProfileFind all posts by DarrenSend Personal MessageVisit Poster's Website
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.066809 seconds :: 17 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme