How to determine which item is currently in focus

Is there a quick javascript way of determining which element on a page is currently in focus??

You tend to complicate things :-)
What you seem to want is: User is typing in some text field, clicks the Submit button, you would like the page to refresh and focus to return to the same text field so the user can continue typing as if nothing has happened?
Then why do a traditional page submit? This seems like a perfect use for the AJAX stuff. Just do the stuff in the background instead of going thru all these hoops to save and restore focus.
Also, it makes (some) sense for text fields, but what use does this feature provide for other input elements like checkboxes and radiogroups and select lists?
What functionality are you trying to provide exactly?
was just thinking about a quick and easy way of setting scrollbar position
on page refreshYou mean having the page refresh and scroll down to some pre-determined point instead of at the top?
This is best done by using named anchors. Just capture the item name that causes the page to submit in a hidden page item and add it to the same-page branch using the
f?p=...#&P1_ANCHOR.syntax.
Just sprinkle your region and label templates with these named anchors and you are done.
Hope this helps.

Similar Messages

  • How to determine which column is currently sorted on?

    When my application closes down I grab all important state information from the various views in my application and persist the state information to a db. On application startup I retrieve the state information and reload all my views with their previous state. I currently save things like column order, column visibility, column size, applied filters, etc... for the tables that are in my app. I would also like to persist which column in each of my tables is currently sorted on, if any, but have been unable to locate an API method that gives me this information. I use the default sorting that is controlled by clicking on one of the column headers so I don't know which column has been sorted on. I don't listen for sorting events. I simply want to ask my table which column is sorted and get back the column or column identifier and the sort order whether ascending or descending.

    Just wanted to update the thread. Your post made also pointed me towards myTable.getSortOrder(Object identifier) which takes a column identifier and returns a SortOrder enumeration of that columns sort state (one of: Ascending, Descending, Unsorted) this allowed me to quickly save the state of each column by iterating through the columns and getting their individual SortOrder property.

  • How CSSCAN determines which indexes need to be rebuild ?

    Hi everybody,
    i'm currently migrating 3 Oracle databases that contain CP1252 characters unproperly stored in WE8ISO8859P1 instances.
    The key steps of the migration are :
    1. ALTERing CHARACTERSET to WE8MSWIN1252
    2. changing CHARACTER SEMANTIC LENGTH for CHAR and VARCHAR2 columns
    3. truncating data stored in VARCHAR2(4000) columns
    2. Full export
    3. Full import in a ALL32UTF8 instance
    To do all of this (and especially the step 3), i use the CSSCAN utility (very practical !!!).
    And i have a question about CSSCAN: how CSSCAN determines which indexes need to be rebuild. What is the logic ?
    Looking at the CSSCAN report, i have a lot of cells/columns that are affected by the characterset migration, and i have just a few index to rebuild.
    Why would i like to understand the logic ? Because i would like to rebuild ONLY indexes that REALLY need to be rebuilt and i am not sure that all the indexes specified by CSSCAN really need to be rebuilt.
    Thanks for any information about that.
    (and sorry for my english)
    NB: i have managed "function-based indexes" specifically: i drop them before the export, and i recreate them after the import. So my question mostly target the "regular indexes"

    1. All indexes whose key contains at least one character column with convertible or exceptional data, excluding indexes with names equal to some constraint name for the same owner.
    plus
    2. All functional indexes on tables that have columns needing conversion, excluding indexes with names equal to some constraint name for the same owner.
    The condition regarding constraints does not seem to be very fortunate but it comes from times when the appropriate flag in index metadata was not yet available.
    But note that in your migration scenario, you do not actually have to care much about indexes. Step 1 & 2 do not need any modifications to the user data and hence to index contents. Step 3, if done through UPDATE, will modify affected indexes automatically. Step 4 does not affect the database. Step 5 will recreate all existing indexes anyway.
    -- Sergiusz

  • How to determine which Windows application has focus

    I'm new to JAVA and new to programming. I hope someone will help me out. I'm trying to write a simple JLink program (JLink is a JAVA API for Pro|Engineer, a CAD design program). In part of this program I need to determine if Pro|E has focus. Is there some way to use JAVA to determine which actively running Windows application has focus?
    I basically want my program to pause when focus changes to another program. For example: While Pro|E is active and has focus the program runs, when I select an Excel window, or Outlook, or Notepad or any other window my program will pause until focus is returned. I just need to determine which window within Windows has focus.
    I hope I have explained this properly. I searched the internet for an answer but found nothing. I did come across some references to JNI, but I'm not sure what that is or how to use it.
    Thank you!

    I just need to determine which window within Windows has focus.No, you don't. All you need to determine is whether your application has the focus. If it doesn't, then some other application does, but it's really irrelevant which one does. All that's relevant is that your application doesn't have the focus and hence it should pause.

  • How to determine which elements are queryable via Web Services QueryPage

    I am trying to query opportunities by associated opportunity product revenue records, but I continue to receive errors like "Unexpected text: = '9598015'".
    From reviewing the forums, it looks like this is when I am querying a field that is not defined to be queryable.
    Could someone please tell me how to determine which fields are queryable on a particular record type like this? I have tried using basic short text fields and indexed short text fields - but continue to receive the error message above.
    Thanks in advance.

    I found at least partial answers to my questions.
    MessageContext.getPropertyNames() can be used to see the properties on a given flow.
    MessageContext.getProperty(prop) can be used to get information for paroperties such as:
    prop=javax.xml.rpc.service.endpoint.address
    prop=wsdl.portName
    -- Frank

  • How to determine which chipset my Satellite L300/700 has?

    I have a SATELLITE L300/700 (PSLB8A-047004). The User Guide covers several models. It indicates that the chipset determines which memory modules I need for a memory upgrade. How do I find out which chipset I have, please?
    Kev.

    > I'm still curious about how to determine which chipset I have - any thoughts?
    Go to the device manger and click on IDE Ata/Atapi controllers:
    http://img814.imageshack.us/img814/7321/chipset.jpg
    There you will see your chipset installed on your laptop. In my case, as shown on the screenshot is Intel ICH9m

  • Could not commint action because item is currently in focus

    Hi,
    I have 2 scenarios  new and existing in exiting i will show grid and in new edit box.
    I f user is in edit box and select existing radio button then i am getting bellow error.
    "could not commit action because item is currently in focus". kindly help me how to disable item when there is a focus.

    Hello,
    You can use the click sub to set the focus.
    So put a EditText into you screen, and when you would like to disable your item, move the cursor to the EditText
    oform.items.item("DUMMYEDITTEXT").Click ()
    'Now you can disable to the item you wanted.
    Best Regards,
    János

  • How to determine which CDockablePane in a group is currently active in Visual Studio 2013

    I understand that to activate a pane, I can do the following:
    dockablePane->ShowPane(TRUE, FALSE, TRUE);
    But, in a group of panes, how can I tell which pane is currently active?
    For instance, let's say there are 3 groups of panes on the screen.  The first group contains three tabs captioned "A", "B", and "C".  The second group contains "D", "E", and "F" and the
    third group contains "G", "H", and "I".
    How would I determine the active pane within each group?  (As an example for reference, within Visual Studio in the left pane group, I can currently see the contents of "Solution Explorer" while "Class View", "Property M...",
    "Resource Vi..." and "Team Explo..." are within the same group but not active.  In the bottom group, I can see the contents of "Output" while "Find Results 1" and "Find Results 2" are present but not active".  
    In the right group, I can see "MySource.cpp" while "MySource.h" is present but not active.  So, I need to know how to request from each pane whether they are the current tab within their container or not.
    Steve

    Hi Steve,
    Thanks for posting in MSDN forum.
    (As an example for reference, within Visual Studio in the left pane group, I can currently see the contents of "Solution Explorer" while "Class View", "Property M...", "Resource Vi..." and "Team Explo..."
    are within the same group but not active. In the bottom group, I can see the contents of "Output" while "Find Results 1" and "Find Results 2" are present but not active". In the right group, I can see "MySource.cpp"
    while "MySource.h" is present but not active. So, I need to know how to request from each pane whether they are the current tab within their container or not.
    This scenerio in your example, we don't need to know the current tab within which tab group. Actually I don't understand why do you need to know that? If you are using
    AFX_DOCK_TYPE::DT_SMART   model dock pane, the dock pane should be implemented in a internal MFC
    CSmartDockingManager
    class and it is not intended to be used directly from your code. . You could read the source code of this class at VS installed path-> VC->altmfc->src->mfc->afxsmartdockingmanage.cpp
    For the dock pane layout in VS interface, I remember there is a sample named Visual Studio Demo sample in Visual C++ 2008 Feature Pack. You can download it at here.
    https://social.msdn.microsoft.com/Forums/vstudio/en-US/b4e6cb6e-e2a8-4e02-9c67-0dc431618157/visual-c-2008-feature-pack-samples-where-to-find?forum=vcgeneral
    And the dock pane control implements the core functionality that controls docking layout in a main frame window by CDockingManager class.
    https://msdn.microsoft.com/en-us/library/bb983791.aspx
    A greate article about using CDockablePane:
    http://www.codeproject.com/Articles/493218/Understanding-CDockablePane
    Please tell us more details about what you want to do.
    Best regards,
    Shu Hu
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • 5s How to determine which version of operating system is currently installed

    How can I determine which version of the operating system is currently installed in my 5s without having to go to iTunes using my PC?

    Tap Settings > General > About.

  • How to read which item in a listbox is currently selected?

    Is it possible to read which item in a listbox is currently selected?
    I know how to tell what item in the list was double-clicked. I'd like to be able to click (once) on an item in the listbox and then use buttons on the front panel to affect the item(and list). For example, click on an item in the list and then click an "insert" button to add an item to the list before the selected one.
    I'd like to be able to do this with both regular and multicolumn listboxes.

    The value of the listbox is just a number for which row is currently selected. If you setup your listbox for 0 or more items or 1 or more items, then the value of the listbox is an array of I32 numbers showing which rows are selected. Use a property node to get the Item Names property (an array of the list items) and you can use the value(s) to index into the array. I have included a VI that I use to move items up and down in the list as well as delete items. Feed it the array of item names and the index for the line you want to move/delete. Then take the output and feed it back into a property node of item names.
    I hope this helps.
    Rob
    Attachments:
    Sequence_Element_Move.vi ‏37 KB

  • SO Pricing User Exit - How to know which item is selected for re-pricing.

    Hello Experts,
    I have to modify material data when user does a update pricing in VA02, the problem is...How do I know which item is selected for re-pricing (in MV45AFZZ)? I am using user exit USEREXIT_PRICING_PREPARE_TKOMP.
    For Ex: If my order has 3 items and 2nd one is selected and then 'Update' is done on 'conditions' tab. Above pricing user exit is triggered 3 times for all items, so I cant check XVBAP.
    Your help will be appreciated.
    Thanks,
    Sagar

    Hi J@Y,
    Thanks for reply. But USEREXIT_PRICING_PREPARE_TKOMP is triggered for all items, so how do I know which is current item?
    If you see in debug mode, xvbap-posnr and tkomp-kposn will have 10,20,30 everytime (for 3 times). How do I know if user has selected 20?
    Thanks,
    Sagar

  • How to determine which diskgroups a database is using

    We want to be able to determine which diskgroups a database is using. We have been using the following query which works but only if the database has open or had open the "right set of files" recently --
    SQL> select dg.name from v$asm_diskgroup_stat dg, v$asm_client c where dg.group_number = c.group_number and c.db_name = 'MYDB';
    If no archived logs have been generated in a while then the diskgroup that contains the FRA will no be listed in this query. We can cause the FRA diskgroup to show up if we archive the current log. Here is an example.
    SQL> select * from v$asm_client;
    GROUP_NUMBER INSTANCE_NAME
    DB_NAME  STATUS
    SOFTWARE_VERSION
    COMPATIBLE_VERSION
                5 +ASM
    DBI03    CONNECTED
    11.2.0.3.0
    11.2.0.0.0
    SQL> alter system archive log current;
    System altered.
    SQL> select * from v$asm_client;
    GROUP_NUMBER INSTANCE_NAME
    DB_NAME  STATUS
    SOFTWARE_VERSION
    COMPATIBLE_VERSION
                5 +ASM
    DBI03    CONNECTED
    11.2.0.3.0
    11.2.0.0.0
    GROUP_NUMBER INSTANCE_NAME
    DB_NAME  STATUS
    SOFTWARE_VERSION
    COMPATIBLE_VERSION
                7 +ASM
    DBI03    CONNECTED
    11.2.0.3.0
    11.2.0.0.0
    Notice how diskgroup "7" shows up after the log is archived? It appears that the instance for diskgroup "7" will eventually be drop off after some idle period. Is there a way to generate the list of diskgroups consistently?

    Hi,
    If your database was configured manually (i.e not using DBCA) you should check v$(datafile,controlfile,logfile,block_change_tracking,etc) and parameters of database (log_archive_dest,db_recovery_file_dest,spfile,etc) to map these info.
    If your database was configured using DBCA you can try it:
    $ srvctl config database -d <database_name> |grep "Disk Groups"

  • How to determine which FileChooser ExtensionFilter has been selected

    Hi,
    I'm using a JavaFX fileChooser.showSaveDialog with two extension filters (*.csv and *.xml). How can I determine which filter was selected when the end-user clicks the save button?
    I am writing a program that allows the end-user to create an output file in CSV or XML format.
    If the end-user enters a file name with no extension, I need a way to determine if I should create a CSV or XML file. I would also like to add the proper extension to the file name if none is specified by the end-user. I want to do this based on which filter the end-user has selected. I wrote a Java program 5 years ago and I was able to do this with the following instruction:
    String extension = jFileChooser.getFileFilter().getDescription();
    I can't find a similar instruction for JavFX.
    My JavaFX Code:
    FileChooser fileChooser = new FileChooser();
    fileChooser.setInitialDirectory(new File(options.getOutputDirectory()));
    ExtensionFilter filter1 = new FileChooser.ExtensionFilter("Comma Delimited (*.csv)", "*.csv");
    fileChooser.getExtensionFilters().add(filter1);
    ExtensionFilter filter2 = new FileChooser.ExtensionFilter("XML Document (*.xml)", "*.xml");
    fileChooser.getExtensionFilters().add(filter2);
    File file = fileChooser.showSaveDialog(stage);
    String filename = file.getAbsolutePath();...How do I determine which extension filter has been selected?
    My Java Code:
    JFileChooser jFileChooser = new JFileChooser();
    jFileChooser.setCurrentDirectory(new File(outputDirectory));
    jFileChooser.setSelectedFile(new File(backupfile));
    FileFilter filter = new FileNameExtensionFilter("Comma Delimited (*.csv)", "csv");
    jFileChooser.addChoosableFileFilter(filter);
    jFileChooser.setFileFilter(filter);
    filter = new FileNameExtensionFilter("XML Document (*.xml)", "xml");
    jFileChooser.addChoosableFileFilter(filter);
    jFileChooser.setAcceptAllFileFilterUsed(false);
    jFileChooser.setDialogTitle("Export Alarms");
    jFileChooser.setBackground(colorFileChooser);
    int returnVal = jFileChooser.showDialog(jFrame, "Export");
    if (returnVal == JFileChooser.APPROVE_OPTION) {
        File file = jFileChooser.getSelectedFile();
        String filename = file.getAbsolutePath();
        String extension = jFileChooser.getFileFilter().getDescription();
        if (extension.equals("XML Document (*.xml)")) {
            if (!filename.endsWith(".xml") && !filename.endsWith(".XML")) {
                filename = filename + ".xml";
            saveTableXML(filename);
        else if (extension.equals("Comma Delimited (*.csv)")) {
            if (!filename.endsWith(".csv") && !filename.endsWith(".CSV")) {
                filename = filename + ".csv";
            saveTableCSV(filename);
    }Thanks,
    Barry
    Edited by: 907965 on May 13, 2012 1:14 PM
    Edited by: 907965 on May 13, 2012 1:15 PM
    Edited by: 907965 on May 13, 2012 1:19 PM

    This problem is currently tracked as http://javafx-jira.kenai.com/browse/RT-18836.

  • How to filter list items by current system time in search result wp or result source SharePoint 2013

    I want to display Items with PressDate less than or equal
    to current time in my search result webpart in SharePoint 2013.
    It is working fine for current date but not considering current time.
    {searchTerms} ContentType="ABC" PressDateTime<{Today+1}
    Above query not supporting for Now(), due to that it
    is showing items which are less than or equal to current (today's) date.
    How can I compare time with current system Time?..Thanks in advance.
    Regards, --NP

    You can achieve the same by using a Current Date Offset in a CAML Query to Filter List Items.
    Have below links for your reference.
    Sharepoint Tips And Tricks
    CAML Query to Date prior to 30 days from today
    Thanks.

  • How to determine which SUS Scenario my company is using?

    Hello,
    How can I quickly determine which SUS Scenario my company is using?  Is this a configuration option in SPRO? 
    We are using ECC to create PO -> IDOC-XML -> PI -> Proxy -> SUS
    SUS creates PO Confirmation, ASN, Invoice response documents to ECC.
    Is this classic/ extended classic/ plan driven? 
    Thanks,
    Matt

    Matt,
      In IMG check this setting.
    Activate Extended Classic Scenario: This setting determines whether Enterprise Buyer processes processes carts with the extended classic scenario
    If this setting is not on, the implementation is either classic or standalone.
    Check define backend systems used. If the backend system is defined as non-sap systems, the implementation is standalone.
    SG

Maybe you are looking for

  • "Errors in Task Sequence" dialog after replicating DS

    I'm trying to replicate some scripts in the \Scripts folder from a Server 2008 R2 machine running MDT 2012 (update nothing) at our main office out to other servers running the same version of Windows and MDT at our remote sites.  I've found that afte

  • Unknown Error when starting the Group Policy Editor

    On Windows 8.1 Professional, I opened the "Edit group policy" from the control panel and also tried to start gpedit.msc from an elevated CMD prompt. In both cases I get the following error message: In English: Failed to open GPO. You may not have app

  • Convert JTree to XML file

    Hi , Can anyone help me in converting a JTree to XML file. The Jtree is build from an xml file, the user can add, delete nodes in JTree and save to the xml file. Is there any way I can update the same xml file. Suggestions are greatly appreciated. Th

  • Gridview onblur event

    Hi, I am having Two gridview ..Parent and child grid. In Parent gridview, there is a link button called click here  when user clicks on it another gridview opens up.In child gridview there is  footer with textboxes. So i want to catch if user have wr

  • [SOLVED] trouble booting an existing windows 8.1 installation in qemu

    I have an existing installation of window 8.1. I want to be able to boot it inside linux (qemu-kvm ideally). Originally, this looked like it was going to be easy. Now a week later, I feel a bit stumped. Here's my layout on /dev/sda: Number  Start (se