| <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. " }} else if (CountyNm == "DeKalb"){ var infoWindowOptions = { content:"{NAME} County does not contain any data. " }} else{ var infoWindowOptions = { content:"<a href='javascript:openCountyWeb(\"{WEB_DIR}\")'><strong>Click here</strong></a> to view the {NAME} County web page <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.
|
|
|