共用方式為


Jumping Around in a Long Form

Hi Everybody,

Hey sometimes you get a long form that requires you to do a lot of scrolling around to get to to the different sections.   I use a lot of tricks with views and/or conditionally hidden sections to make things look like they all fit on one page.  Nevertheless, there are some of you that just want a big 'ole form, but need some navigation.   I asked the question of the true experts and they gave a very simple code sample that shows how to enable that.

function yourcontrolname::OnClick(eventObj)

{

var objfield2= XDocument.DOM.selectSingleNode("//my:myFields/my:field2");

XDocument.View.SelectText(objField2);

}

It's fairly self explanatory.   You assign a variable to a node value and then use the SelectText call to navigate to that node.   The original sender of this idea, Scott Heim, also informed me that you modify a button to the point where it looks just like a hyperlink if you so desire.  I prefer a button myself but that's not for everyone.  Enjoy.

Comments