logo

New Response

« Return to the main article

You are replying to:

  1. One problem you get if you use an anchor like that:

    i.e <a href="#" blah blah>

    ... is that if you have a long form, and you are doing validation or using javascript to pop-up a child form, the anchor link will cause your form to "jump" back up to the top of the form (it's looking for a bookmark labelled "#") .. which might not be very convenient if the user was half-way down the form filling something out.

    You can set focus in your javascript function back to the field object that the user was working on (if it's an object that can take a focus) .. but that causes the form to jump around which is ugly.

    Jake's suggestion to use a straight onclick="javascript:void yourfunction();" in your href is better.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: