Page 1 of 1

both link to function and to header?

Posted: Tue Jan 16, 2007 8:46 am
by sarris
hi there. i have a simple question. i have an anchor tag that calls a javascript function. however i want it to direct at a header in the page.

Code: Select all

<a href='javascript: myfunction(x)'>Closer look</a>

Code: Select all

<a href="#Some header">Closer look</a>
i want those two in one link. how can this be done?

Posted: Tue Jan 16, 2007 1:14 pm
by aaronhall

Code: Select all

<a href="#Some_header" onclick="myfunction(x)">Closer look</a>