Abby Posted September 15, 2010 Share Posted September 15, 2010 The validator had a problem with the </a> tag after my name in the example below. However, I can't remove the </a> tag without making the whole sentence clickable. What should I do? <script type="text/javascript"> <!-- var Domain = "mydomain.com" var Mailme = "webmaster@" + Domain document.write("<a href=\"mail" + "to:" + Mailme + "?subject=Contract Artist\" >"); // --></script><b>Abby</b></a> for pricing or more information. Link to comment Share on other sites More sharing options...
dsonesuk Posted September 15, 2010 Share Posted September 15, 2010 place it in the javascript<script type="text/javascript"> <!-- var Domain = "mydomain.com" var Mailme = "webmaster@" + Domain document.write("<a href=\"mail" + "to:" + Mailme + "?subject=Contract Artist\" ><b>Abby</b></a>"); // --></script> for pricing or more information. Link to comment Share on other sites More sharing options...
dsonesuk Posted September 16, 2010 Share Posted September 16, 2010 the reason it fails is because the validator cannot see the starting tag of the anchor <a within the javascript but it can see the end tag so reports it as an error. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.