Long vertical forms that scroll with the tabbing to keep cursor on screen

I have a tall vertical form that is roughly 2000px in height.
If the user tabs through the fields they will 'fall off' the bottom
of the screen. Meaning, the cursor will move to a field out of view
but the scrollbar will not nudge down automatically to compensate
and keep the cursor in view. Ideally the scrollbars would move with
the cursor as they do when tabbing through a traditional html form.
Any help is appreciated. Thanks.
--Lokesh

I have had to do this very thing myself. Kinda wish it were
part of the normal framework...
anyway, here is an example application that does what you are
trying to do:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
private function checkPos(target:Object=null):void {
var yPos:Number = target.y+target.height;
debug.text = "";
var shiftAmt:Number = 0;
if (yPos>cont.verticalScrollPosition+cont.height) {
shiftAmt = yPos-(cont.verticalScrollPosition+cont.height);
debug.text+="move down: "+shiftAmt+"\n";
} else if (yPos<=cont.verticalScrollPosition) {
shiftAmt = yPos-(cont.verticalScrollPosition+target.height);
debug.text+="move up: "+shiftAmt+"\n";
cont.verticalScrollPosition+=shiftAmt;
debug.text+="yPos: "+yPos+" view space:
"+cont.verticalScrollPosition+" -
"+(cont.verticalScrollPosition+cont.height);
]]>
</mx:Script>
<mx:Text id="debug" width="200" height="200" />
<mx:Canvas id="cont" width="200" height="200">
<mx:Button label="blorch1" y="0"
focusIn="checkPos(event.currentTarget)" height="20" />
<mx:TextInput focusIn="checkPos(event.currentTarget)"
y="100" height="20" />
<mx:Button label="blorch2" y="200"
focusIn="checkPos(event.currentTarget)" height="20" />
<mx:TextInput focusIn="checkPos(event.currentTarget)"
y="300" height="20" />
<mx:Button label="blorch3" y="400"
focusIn="checkPos(event.currentTarget)" height="20" />
</mx:Canvas>
</mx:Application>
If your form has a TON of controls, then you might want to
just make a function to automatically attach the listener in
actionscript... dunno which is easier. Writing onFocus="blahblah"
for each component is a drag but it's simple...
If there is an easier way to do this, I hope someone will say
so because this is how I have to do it and it's not very
fun.

Similar Messages

  • Having recently updated Firefox, there now seems to be a long delay before many webpages load. Is there any way to easily revert to the previous arrangement, for example by removing new features that came with the upgrade that I probably don't use?

    Having recently updated Firefox, there now seems to be a long delay before many webpages load. Is there any way to easily revert to the previous arrangement, for example by removing new features that came with the upgrade that I probably don't use?

    Having recently updated Firefox, there now seems to be a long delay before many webpages load. Is there any way to easily revert to the previous arrangement, for example by removing new features that came with the upgrade that I probably don't use?

  • My touchpad will not scroll with the current version of foxfire.

    The screen in foxfire will not scroll with the sliding of my finger on right side of the touchpad on my lenovo thinkpad or the navigation button. It does work with all other programs including windows explorer and google chrome.

    OK, this is the original poster again. The trackpad scrolling problem has been sporadic. Now I have realized that I have this problem (in Firefox 7.0 and 7.01) WHEN THERE IS A PDF DOCUMENT OPEN IN ONE OF THE TABS. When there is a .pdf open, trackpad scrolling works fine in *that* tab but not in any of the other Firefox tabs that are open. When I close or move away from the .pdf file, then the scrolling function returns in the other tabs. Is there something about the Acrobat plug-in (ver. 9.4.5) that isn't working correctly in Firefox 7.x?

  • The screen of my MacBook Pro itself periodically switches the color. That is, with the usual colors, on some blue. What to do? Should be repaired, or you can figure out the most? HELP ME PLEASE!

    The screen of my laptop itself periodically switches the color. That is, with the usual colors, on some blue. What to do? Should be repaired, or you can figure out the most? HELP ME PLEASE!

    LambChops1,
    I’m using Mavericks, and it’s still possible to select text to drag and for cutting and pasting. Left-clicking and right-clicking is still possible, too.
    Try opening the Trackpad pane of System Preferences, and select the Point & Click tab. To right-click, ensure that your “Secondary click” checkbox has been checked; the small print under “Secondary click” is a dropdown menu which allows you to select the form of right-clicking that you prefer. (For instance, mine is set to “Click in bottom right corner”.) For left-clicking, is your “Tap to click” checkbox checked, or unchecked? (Mine is unchecked, since I prefer pushing for left-clicking over tapping to do so.)

  • I have an issue with the tabs and windows disappearing....?

    I have a constant problem with Firefox now. I notice that with Firefox 4 and 5 there has been a reoccurring problem with the tabs and windows closing on their own. If I have more than one window open, one of them will suddenly disappear and I wont see the tab at the bottom anymore until I click out of the one I am currently on. It is very annoying and only when I get out of Firefox completely will it sometimes reappear. Even more frightening is the fact that when I move the mouse downward to the bottom of the page the page shuts out as if I clicked out of it.
    I am wondering if this is a security issue meaning some type of malware or virus that is manipulating my browser or is this a common issue that has some unknown cause? I would like to know what the cause is and how it can be fixed because it annoys me all the time. Please help!!

    No Issue with the voltage in general. iPad is being charged via USB.
    1. If you connect it directly to the computer - no problem.
    2. If you want to charge it directly from the power socket you will need this:
    http://store.apple.com/uk/product/MB706B/B/apple-usb-power-adapter
    TZ

  • HT2513 my iCal calendar that I created with the color green keeps changing to purple.  no matter how many times I change it to green, it turns it back to purple.  Of course this only happens with iCloud and not "from my Mac".  Any ideas?

    my iCal calendar that I created with the color green keeps changing to purple.  no matter how many times I change it to green, it turns it back to purple.  Of course this only happens with iCloud and not "from my Mac".  Any ideas on how to correct this?  This seems like a trivial error, but it's super annoying.

    I called Apple and they said that they know about this problem.  It's a problem with iCloud which their Engineers know about.  (there was a new iCloud release, hence...)  No ETA for a fix yet.  I asked that this be escalated so Engineering doesn't put it at the bottom of their fix list.  I talked to a Senior Advisor and mentioned to them to have QA check their regression tests as this has happened before to me (the problem just didn't take this long to resolve).  I like to use green too for important stuff, so I've resorted to creating a new calendar using the normal calendar green for events going forward.  They could have picked another color besides green to have this problem with and I wouldn't have been so upset.  ;-)

  • After Mavericks OS upgrade, can no longer make any HTTP requests with the OPTIONS verb

    My machine can no longer make any HTTP requests with the OPTIONS verb. This happens whether I try it curl, postman, or ajax.
    curl -i -X OPTIONS http://www.google.com returns curl: (52) Empty reply from server
    It should return a long string containing a 405 error code.
    I suspect that this is related to the Mavericks upgrade I did earlier this week. I only have one mac (my dev machine) with Mavericks. Other macs are Mountain Lion and they don't have this problem.
    Can anyone else with Mavericks confirm whether or not they have this problem too?
    If this is Mavericks related, anyone know of a fix or workaround?

    Turns out that it wasn't Mavericks related at all. Cisco AnyConnect has a security module running behind the scenes even when you're not VPNed into anything. It was blocking my OPTIONS verb requests. I was able to make these calls after uninstalling.
    Re-installing with Web Security turned off should prevent it from happening. While I was uninstalling I did notice that there was a web security uninstall script in /opt/cisco/vpn/bin but I already committed to taking the whole app off my machine. Simply running that script could have done it too.
    I must give credit to Ben Nadel. It was his blog post that helped me fix this issue.
    http://www.bennadel.com/blog/2559-Cisco-AnyConnect-VPN-Client-May-Block-CORS-AJA X-OPTIONS-Requests.htm?&_=0.10495476494543254#comments_44093

  • If you dont have the sim card that came with the iphone and you resync it how do you get it to turn back on .?

    if you dont have the sim card that came with the iphone and you resync it how do you get it to turn back on .?

    You have been syncing the iPhone with iTunes on your computer without a SIM card inserted in the iPhone for how long?
    If the iPhone says connect to computer, this means there is a problem with your iPhone that requires restoring the iPhone with iTunes. As already provided, not having a SIM card inserted in an iPhone does not prevent or shouldn't prevent syncing the iPhone with iTunes. Depending on the iPhone model, it is required in order to restore the iPhone with iTunes.
    http://support.apple.com/kb/ht3406
    To re-activate an iPhone 3G or iPhone 3GS that displays the "Connect to iTunes" screen:
    Insert a SIM card from the carrier with which you used your phone. Note: If you are using the same carrier, you can use the activated SIM card from your new device to do this. If your device is unlocked by your carrier, you can use any SIM card.
    Connect the iPhone 3G or iPhone 3GS to iTunes on a computer connected to the Internet.
    iTunes will then activate the device. You can remove the SIM card at this point and use the iPhone as if it were an iPod touch.

  • I just replaced my hard drive and am trying to install the Snow Leppard OS on my Mac mini using the DVD's that came with the unit. Is there a step by step procedure that will guide me through this process?

    I just replaced my hard drive due to failure in my Mac mini. I am trying to load the Snow Leppard OS from the DVD's that came with the unit. Is there a step-by-step procedure somewhere that would help me? This is my first problem with my first Mac. I thought getting to the hard drive and changing it would be the hard part but I made it through that with little trouble. My lack of software experience on the Mac is really slowing me down. I believe I'm not making the right choices in the Disk Utility program.Any help would be greatly appreciated. Thank you.

    Prep the new drive:
    Drive Preparation
    1.  Boot from your OS X Installer Disc. After the installer loads select your language and click on the Continue button.  When the menu bar appears select Disk Utility from the Utilities menu.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Note the SMART status of the drive in DU's status area.  If it does not say "Verified" then the drive is failing or has failed and will need replacing.  SMART info will not be reported  on external drives. Otherwise, click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, set the partition scheme to GUID then click on the OK button. Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Options button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.
    Upon completion quit DU and return to the installer. Install OS X. When the installation has completed you can proceed to restore your data from your backups. If you have an existing backup from Time Machine or another hard drive then upon completing the Setup Assistant you will have an option to restore from another Mac, a TM backup, or another drive. Use the appropriate option.

  • HT4436 Just did a restore for a new 4S. I want to do a new iCloud account and discard the one that came with the restore. Any suggestions?

    Just did a restore for a new 4S. I want to do a new iCloud account and discard the one that came with the restore. Any suggestions?

    Welcome to the Apple community.
    Settings > iCloud, scroll down and delete the account, sign back in by choosing the option to create a new Apple ID.

  • I cant scroll with the mouse in firefox, the scroll works with other apps

    i cant scroll with the mouse in firefox, am using firefox 26

    Open a new window or tab. In the address bar, type '''''about:config'''''.
    There is a search bar at the top. Type '''scroll.m''' (scroll<'''dot'''>m).
    The setting for
    '''general.smoothScroll.mouseWheel'''
    should be '''TRUE'''.

  • How can I have a browser image that scrolls with images on top of it scrolling in tandem -

    How can I have a browser image that scrolls with images on top of it scrolling in tandem - so the background is a hexagon pattern with small images inside some hexagons and I want them all to be scrollable as a user uses the browser scroll bars. At the moment the background image jumps when I preview so the small hexagons all become out of alignment. Any tips appreciated. I have browser image set to tile - pinned at the middle and set to scrolling - the small images are not pinned -

    Thanks for your answer - The images on the top layer are also links and change to show they're links on rollover - so I wanted to keep them as separate graphics - and it works to a point but when I preview the page in a browser the tiled browser image always moves no matter how I pin it and then everything becomes unaligned. Any further suggestions appreciated.

  • When using Safari I am unable to scroll with the trackpad when on a PDF browser plugin page.

    I can't scroll with the trackpad when I have a PDF open in Safari, I have to go use the scrollbar. Is there a way to fix this?

    Back up all data before making any changes. Please take each of the following steps until the problem is resolved.
    Step 1
    If Adobe Reader or Acrobat is installed, and the problem is just that you can't print PDF's displayed in Safari, you may be able to print by moving the cursor to the the bottom edge of the page, somewhere near the middle. A black toolbar may appear under the cursor. Click the printer icon.
    Step 2
    There should be a setting in its preferences of the Adobe application such as Display PDF in Browser. I don't use those applications myself, so I can't be more precise. Deselect that setting, if it's selected.
    Step 3
    If you get a message such as ""Adobe Reader blocked for this website," then from the Safari menu bar, select
    Safari ▹ Preferences... ▹ Security
    and check the box marked
    Allow Plug-ins
    Then click
    Manage Website Settings...
    and make any required changes to the security settings for the Adobe PDF plugin.
    Step 4
    Triple-click anywhere in the line of text below on this page to select it, the copy the selected text to the Clipboard by pressing the key combination command-C:
    /Library/Internet Plug-ins
    In the Finder, select
    Go ▹ Go to Folder
    from the menu bar, or press the key combination shift-command-G. Paste into the text box that opens by pressing command-V, then press return.
    From the folder that opens, move to the Trash any items that have "Adobe" or “PDF” in the name. You may be prompted for your login password. Then quit and relaunch Safari.
    Step 5
    The "Silverlight" web plugin distributed by Microsoft can interfere with PDF display in Safari, so you may need to remove it, if it's present. The same goes for a plugin called "iGetter," and perhaps others—I don't have a complete list. Don't remove Silverlight if you use the "Netflix" video-streaming service.
    Step 6
    Do as in Step 4 with this line:
    ~/Library/Internet Plug-ins
    If you don’t like the results of this procedure, restore the items from the backup you made before you started. Relaunch Safari.

  • HELP! iPod sorting artists that start with "The" under "T"

    OK, so I synced my iPod classic last night, and now ALL artists that start with "The" are listed alphabetically under "T". Prior to last sync, it had never done this. I didn't change any setting, the only reason for the sync was to add a podcast that had downloaded. It also appears that the sorting feature is no longer ignoring punctuation, because "Weird Al" Yankovic is now alphabetically first, as opposed to under "W" where he was previously. What happened, and how do I get it back to normal?
    Thanks

    Hi, welcome to Apple Discussions.
    It should sort itself out if you reset your iPod, otherwise you will need to do a complete restore. If you are not familiar with those terms take at look at http://www.apple.com/support/ipod/five_rs/classic/
    tt2

  • I ERASEd WINDOWS. I want to re-install it and before, i'd'like to re-install all the system (10.6.7). But that seems to be impossible. When i try to turn on with the softare and pushing "c", blind screen. When i turn on it normaly, nothing happened. pls,

    I ERASEd WINDOWS. I want to re-install it and before, i'd'like to re-install all the system (10.6.7). But that seems to be impossible. When i try to turn on with the softare and pushing "c", blind screen. When i turn on it normaly, and put the disc after, the process begins and stops 5 minutes after. The computer turns off. Has someone an idea to help me ? Thanks by advance.
    Zach

    Thank you for your answer.
    And...Yes, i did : i inserted the install disc and started up holding the C key. Many time. But each time, the logo of install disc appeared during ten minutes and then, during the installation, he disappeared suddenly with no reason. And in  the same time the computer turn off.
    The beginning of the storry : my son made long time ago (a year) the partition between Mac and Windows. Everything was fine.
    Recently, He decided to give more memory space to windows.
    He could do that directly (perhaps, was there a way but he did'nt know it)
    For this reason, he decided to desinstall Windows in a first step before reinstalling it.
    But before doing this, he decided to re install all the system, like for cleaning his computer...and then, since, it's a big mess.
    You know everythin now.
    Could you help us ?
    Thanks by advance.

Maybe you are looking for