[TYPO3-core] FYI24: #10953: Validation issue: <a> attribute "href" lacks value in shortcut menu

Patrick Broens patrick at netcreators.com
Thu Apr 23 10:40:03 CEST 2009


Mathias Schreiber [wmdb >] wrote:
> Dmitry Dulepov schrieb:
>> I remember that href="#" caused page reload instead of processing
>> onclick even if onclick returned false. It was long time ago (a year
>> or so) and I do not remeber exact details. I am not sure if it is
>> still the case but it is good to check it...
> 
> In certain IE builds an <a href="#" onclick="whatEver();"> causes the
> browser to jump to the top of the page.
> 
> But I don't think this is a problem in the shortcut menu, since it is
> rather short anyways.
> 
> But skinning should be taken into account, so that this call doesn't
> trigger the new skin to jump around.
> 
> Whats wrong with <a href="Javascript:myFunctionCall();">?
> Doesn't look nice, but does the job.
The problem is in IE (what's new). When you add a javascript call in the
href attribute, images within the link might get lost. We already have
some of these issues in the BE. In IE6 you will miss some icons. If this
was the right solution I would have taken href="javascript: void(0);"
:-) Even M$ suggests to leave the # and add return false;

I'm currently looking at the validation stuff and this will be a very
slow process. Eventually I would like to see all javascript calls
properly made from event observers, not onclick="" or oncontextmenu=""
in anchor or other tags. The last one is proprietary, not every browser
understands it.

Patrick
> 
> cheers
> Mathias


More information about the TYPO3-team-core mailing list