0

Is there a way to jump to the top of a page after a DOM node insert?

I'm using the <yml: form> tag with insert="my_div_here" to replace the contents of a <div> but it would be great to have it jump back to the top of the page straight afterwards.

I've tried using scrollTo(0,0) and tried using anchors but those don't seem to be working. Are those meant to work or do I have to do something else?

by
1 Reply
  • Hi miggleweb,

    Have you tried something like the following wrapping the submit button?

    CODE
    <a href="#" onclick="insertNode()">Insert Node</a>


    Jonathan LeBlanc
    Technology Evangelist
    Yahoo! Developer Network
    Twitter: @jcleblanc
    0

Recent Posts

in YAP