both link to function and to header?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
sarris
Forum Contributor
Posts: 137
Joined: Mon Dec 04, 2006 2:44 pm

both link to function and to header?

Post 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?
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

Code: Select all

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