![]() |
HREF / SRC empty
I was trying to run a validation software within our company's website that was developed using coldfusion.
The website renders perfectly but it fails verification. This is the following error i get. This link is broken. The SRC or HREF is an empty string HREF=”” or SRC=”” can cause unexpected effects such as traffic spikes or cookie corruption. The code affected is: <a href="" onClick="window.open('#to_root#debug_mode.cfm?height=400,width=500,scrollbars=yes');return false;" target="_top" class="globalNavButton">Debug</a> I have tried to add a # sign to the href target, but that brought an error to the website and the page would not render. Would anyone be able to assist on how to bypass this issue? Thank you |
The value to put in the href is the address of the page that people without JavaScript are supposed to be taken to if they click on the link.
|
Generally I’m felgall’s opinion that an anchor must work without JavaScript. But sometimes there are cases where we as developers have no choice other than working with what we’ve got. That said, remove the href completely as apparently it serves no purpose anyway. An anchor is valid without href attribute, too.
|
Quote:
Of course if it is for an intranet where everyone is confirmed to have JavaScript then having the tag in the HTML without the href makes sense. Another alternative is to make it a <span> tag rather than an <a> tag. |
| All times are GMT +1. The time now is 08:48 PM. |
Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.