homepage Welcome to WebmasterWorld Guest from 54.204.141.129
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
<a href> within <head> section
Loosh




msg:4236913
 4:39 pm on Nov 30, 2010 (gmt 0)

Doctype: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Hi I have the following code in a function within the <head> section. The w3c validator is telling me "document type does not allow element "a" here" and "document type does not allow element "br" here" for the line..."content:"<a href....." I need this line because it is popping up an infowindow which has a link to the appropriate web page, but I am not sure if I can use the <ahref> within the head section. I am using the ArcGIS Javascript extension for Google maps in my web page also.

function addResults(fset) {
var overlayOptions = {
strokeColor:"#FF0000",
strokeColor:"#00008B",
fillOpacity:0
}

var feature = fset.features[0];
var attrs = feature.attributes;
var CountyNm = attrs.NAME;

if(CountyNm == "Boone"){
var infoWindowOptions = {
content:"{NAME} County does not contain any data. &nbsp; &nbsp;"
}}
else if (CountyNm == "DeKalb"){
var infoWindowOptions = {
content:"{NAME} County does not contain any data. &nbsp; &nbsp;"
}}
else{
var infoWindowOptions = {
content:"<a href='javascript:openCountyWeb(\"{WEB_DIR}\")'><strong>Click here</strong></a> to view the {NAME} County web page &nbsp; &nbsp;<br /> for detailed information."
}};

 

tedster




msg:4236948
 5:34 pm on Nov 30, 2010 (gmt 0)

Welcome to the forums, Loosh.

If validation is important, you can declare the function in an external .js file and call that file from within the <head> section.

Loosh




msg:4236968
 6:01 pm on Nov 30, 2010 (gmt 0)

Hi thank you! I'll try that.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved