Focus cursor on field/reposition

A BSP has been build with a large number of fields. To fill out the bottom fields the user has to scroll down. As a consequence you also have to scroll down every time the page is rendered (e.g. clicking on tableview on lower part of BSP) in order to go back to the last field(s).
I saw that there is a way to overcome this by using tag <htmlb: page reposition = "TRUE" >. I have tried this but the BSP just shows a white screen.
How do I have to use the tag in the BSP? Can somebody provide me with some HTML-source
The BSP has a start-view with several includes....
Message was edited by:
        Henry Helderop

Hi,
Maybe you could try this out
<head>
<script type = "text/javascript">
function saveScroll() {
  if (!scroll) return;
  var now = new Date();
  now.setTime(now.getTime() + 365 * 24 * 60 * 60 * 1000);
  if(!reset_scroll){
    var x = document.body.scrollLeft;
    var y = document.body.scrollTop }
  else{
    var x = 0;
    var y = 0;
  setCookie("xy", x + "_" + y, now);
function loadScroll() {
  if (!scroll) return;
  var xy = getCookie("xy");
  if (!xy) return;
  var ar = xy.split("_");
  if (ar.length == 2) scrollTo(parseInt(ar[0]), parseInt(ar[1]));
</script>
</head>
<body onLoad="loadScroll()" onUnload="saveScroll()">
</body>
That's the way it works for me.
Regards,
Dirk.

Similar Messages

  • Focus cursor

    Hello
    I would like that on my page fro login cursor is always in the field for username.In my page cursor is in tha address bar.Do you know how to focus cursor
    Thanks in advance

    you mean you want the cursor to focus on the username field??
    if so put in your <body> tag :
    onLoad="document.formname.fieldname.focus();"
    where "formname" is the name of your form, and "fieldname" is the name of the field you want to focus on.

  • Move cursor through fields in screen with ENTER like TAB

    Hello experts !
    I want to move the cursor between fields in a custom screen just like kay TAB do.
    I have used command:
    MOVE CURSOR TO FIELD mara-spart... but it doesnt work, Cursor remains in th first field..,
    any help?
    Thank you and regards,
    Ibrahim Andres

    For example, here is the exact code which is working in my system and has been for quite a while. 
    The screen flow logic.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_1500.
    PROCESS AFTER INPUT.
    MODULE USER_COMMAND_1500.
    The code for module status_1500.
    *      Module  STATUS_1500  OUTPUT
    module status_1500 output.
      set pf-status 'STDCONSOLE'.
      set titlebar '1500_07'.
    <b>  set cursor field cursorfield.</b>
    endmodule.
    The PAI module  USER_COMMAND_1500
    *      Module  USER_COMMAND_1500  INPUT
    module user_command_1500 input.
      case sy-ucomm.
        when 'ENTER'.
    <b>* Scroll thru fields when user hits enter
          get cursor field cursorfield.
          case cursorfield.
            when 'P_TICNO'.
              cursorfield = 'P_PERNR'.
            when 'P_PERNR'.
              cursorfield = 'P_WERKS'.
            when 'P_WERKS'.
              cursorfield = 'P_LGORT'.
            when 'P_LGORT'.
              cursorfield = 'P_AREAC'.
            when 'P_AREAC'.
              cursorfield = 'P_TICNO'.
          endcase.</b>
       endcase.
    Here I'm using the same variable CURSORFIELD for setting/getting. 
    Regards,
    Rich Heilman

  • Why does the "TAB" key no longer work to move the cursor from field to field with Firefox 17 in MAC OS 10.8?

    The "TAB" key will not move the cursor from field to field with Firefox 17 in MAC OS 10.8. You have to use the mouse to click on the new field to move the cursor.

    See:
    * http://kb.mozillazine.org/accessibility.tabfocus
    Note: In OS X (as of 2005-01), if this preference is not explicitly set, the “Full Keyboard Access” setting in System Preferences will be honored. All builds before that date (e.g., Firefox 1.0.x) will ignore that setting.
    This pref doesn't exist by default, so if you want to use it instead of the system settings then you need to create a new Integer pref with the name accessibility.tabfocus and set the value to what you want (7 is to tab through all the fields).

  • Cursor focus to error field.

    In APEX 3.0, when I use Validations, Type Function Returning Error Text:
    If :P1_ITEM is null then
    return 'Must enter a value';
    end if;
    Everything is fine, except the cursor goes to the first field in the page. How do I make the cursor go to the field that contains the error (back to the field that did the validation)? Thanks in advance.

    Hi Shirley
    Sorry I did not see this post but I did reply to your question you post about inserting caps.
    if you create another page item say P1_PAGE_FOCUS then as part of your validation you set its value.
    If :P1_ITEM is null then
    :P1_PAGE_FOCUS := 'P1_ITEM';
    return 'Must enter a value';
    end if;
    add this bit of javascript to your header
    function setFocus(FocusItem)
      try {
        var oFocus = document.getElementById(FocusItem);
        document.getElementById(oFocus.value).focus();
      catch(err) {
        null;
    }You should also that your pages Cursor Focus is not set to first page item. Then add the following to your HTML Body attribute
    onLoad ="setFocus('P1_PAGE_FOCUS');"
    This should then set the page item that you want to set focus to the invalid page item.

  • Cursor focus in text fields in Safari broken after Snow Leopard upgrade

    Hi, I just upgraded from Leopard to Snow Leopard on my Macbook. Since then, whenever I am typing in a text field in Safari (e.g. Gmail's compose message contents field), the cursor freezes. I cannot move the cursor with either arrow keys or the mouse. I cannot select text. The only way to move the cursor is to click on a different text field (e.g. the email subject field in Gmail) and then click back on the location I want in the first text field. But even after that, I cannot move the cursor within that field aside from typing characters -- I still have to click back and forth between different text fields.
    I have not had this problem in Firefox.
    This seems like a minor thing but it makes Gmail unusable in Safari, which basically means Safari is useless to me now. Still, I prefer to use Safari for general web browsing since it is much quicker, so I am hoping someone can recommend a fix (preferably not going back to Leopard, although that is an option via a SuperDuper restore).

    HI,
    Other Safari users have experienced this issue but the issue resolved itself after uninstalling the Flash player plugin, then reinstalling, then repairing permissions.
    Go here and follow the instructions. Uninstall Flash
    Install the most recent version of Flash here.
    Now repair permissions.
    Launch Disk Utility. (Applications/Utilities) Select MacintoshHD in the panel on the left, select the FirstAid tab. Click: Repair Disk Permissions. When it's finished from the Menu Bar, Quit Disk Utility and restart your Mac. If you see a long list of "messages" in the permissions window, it's ok. That can be ignored. As long as you see, "Permissions Repair Complete" when it's finished... you're done. Quit Disk Utility and restart your Mac.
    Carolyn

  • Move focus/cursor to FIRST errored field

    I have a page with serveral inputText fields. Most fields are validated for a date, number, currency, or just a required string. How can I move/display the cursor in the FIRST field in error. It seems the cursor just disappears, I then have to use the mouse to click on the field that is in error to correct the error. Seems that JSF should take care of this.
    Thanks for your help.

    Hi all,
    Please can any one help me i am new for java Script. It will be a great help.
    will Appreciate any other approach.
    Thank You,
    Amit

  • How can I set the focus to a field on a Portal form?

    Can anyone tell me if it is possible to set the focus to a particular field on a form which was created in Portal and is based on a PL/SQL procedure?
    The form contains a mixture of field types and also takes parameters from another form and displyas them.
    I have managed to set the focus on a form which is defined dirdctly in a PL/SQL procedure, using Javascript, but this doesn't seem to work for a Portal form.

    Hi,
    look at the discussion on May 25:th 2001, subject "How to get the cursor into a specific field", it might give you an idea.
    To give you some hint right now:
    In the "Additional PL/SQL Code" tab, "Before displaying the page", add following code:
    htp.p('<BODY onLoad="document.forms[0].elements[6].focus();">');
    forms[0] if you only have 1 form, and elements[the number of the item you want to be in focus]
    I hope this could help you
    /Sara

  • Focusing a desired field on hitting enter - af:table

    Hi,
    I'm trying to implement the following use-case.
    Resources(name, description, is_rate_based, rate, quantity, cost) table stores the details of two types of resources - rate based and non-rate based. This data needs to be shown in UI as a click-to-edit, multi-select table.
    Now, for any row,
    if the resource is rate based (is_rate_based='Y'):
    1. Fields Rate & Quantity should be editable and cost field should not be displayed
    if the resource is not rate based (is_rate_based='N'):
    Fields Rate and Quantity should be disabled and Cost should be editable
    Also,
    when the user enters a value (for a rate-based resource) in Quantity field and presses ENTER key,
    The next row's Quantity field should be focused if the next row has a rate-based resource, otherwise, Cost field should be focused
    Similarly,
    when the user enters a value (for a non-rate-based resource) in Cost field and presses ENTER key,
    Focus should be on next row's Quantity field if the resource in the next row is a rate-based resource, else, cost field should be focused.
    While implementing this behavior, I realized that, the framework handles the focus event on hitting enter if all the rows are stamped with identical fields. However, when rows do not have identical fields, focus goes to the first editable field of the next row on pressing ENTER key.
    I'm trying to override this behavior by using clientListeners for the Cost and Quantity fields - but couldn't figure out how to do this.
    Any pointers/solution for the above case?
    Thanks,
    Sridhar

    Hi,
    This happens because every time you hit ENTER, the PAI is triggered and then your PBO of the screen where you havent populated your table control with values from the internal table.
    Try this.
    -> Repopulate your data in the internal table in the PBO as well.
    PROCESS BEFORE OUTPUT.
      LOOP AT t_tbcl WITH CONTROL tbcl CURSOR tbcl-current_line.
        module display_data.  "Populate your table control with data from the internal table t_tbcl.
    ENDLOOP.
    -> To avoid further problems, clear your internal table in the PAI in a module before the LOOP...ENDLOOP
    PROCESS AFTER INPUT.
    module cleartable.
      LOOP AT t_tbcl.
        CHAIN.
          FIELD: t_tbcl-kostl,
                 t_tbcl-posnr,
                 t_tbcl-ebeln.
          MODULE modify_t_tbcl ON CHAIN-REQUEST.
        ENDCHAIN.
      ENDLOOP.
    MODULE modify_t_tbcl INPUT.
      t_tbcl-mark = 'X'.
      MODIFY t_tbcl INDEX tbcl-current_line TRANSPORTING mark.  "try including the TRANSPORTING addition as well
    ENDMODULE.    
    module cleartable.
    clear t_tbcl.
    clear t_tbcl[].
    endmodule.

  • Focusing a text field

    Hi,
    I have an input field in a view. This field is not getting focused when the view appears. What I mean is the cursor is not appearing in the field when the view appears and once the user taps on the field, it is focusing. So without tapping, how we can acheive this functionality.
    Regards
    MQ

    get the AttributeInfo of the Context Node represented by the form element.
    IWDAttributeInfo attribute = wdContext.nodeA().getNodeInfo().getAttribute(A.theattribute);
    wdThis.wdGetAPI().requestFocus(currentAElement(), attribute);
    (assuming you an element named A with an attribute called "theattribute")
    Hope that helps
    Jan

  • Why do HOME and END ignore focus in text fields?

    I just noticed that the HOME and END keys seem to ignore focus in a text field on webpages.
    Normally, they go to the beginning and end of a webpage, which is perfectly fine with me. And in fact it's quite useful on really really long webpages.
    However, when my cursor is in a text field (“focused”), I expect HOME to go to the beginning of the line and END to go to the end of the line. However, this is not the case.
    1. Does anybody know why this is the case?
    2. Does anybody know if this can be changed to my desired behavior?

    Well, I'll be damned!
    I feel a bit sheepish, but I'd never noticed that that was the way Home and End worked everywhere. For some reason I had assumed it was Safari-only. Once I read your post, I was purposely mindful about the keys I was using, and I realized that I'd learned to automatically use ⌘← and ⌘→ when editing text elsewhere. Weird.
    I think this probably arose from the fact that my first Apple computer was a laptop, and since Home and End are built into the arrow keys on the smaller keyboard, I suppose it was enough to mask the difference.
    *Follow-up question:*
    Is there a technical / usability / official reason for this discrepancy? I remember being taught the function of Home and End in computer classes in Elementary School (late 80s and early 90s for me). Some of the computers in these classes were Apple and some where PCs. (I acknowledge that Apple during that time is not the same as Apple after Steve Jobs returned as CEO, but if the cause of this difference is Apple vs. Microsoft related, then I thought it was possibly relevant.)

  • BDT DCHCK validation cant focus cursor

    Hi
    I have written a FM that checks that PO BOX (in txn FPP1) only contains digits . I have used txn BUS7 and event DCHCK to confgure when BDT calls the FM.
    The validation seems to work. I call BUS_MESSAGE_STORE to display a validation error message and the error is displayed as expected. In this case I would also like to put the cursor focus in the PO BOX field but I cannot get this to work.
    I believe it is just a matter of setting parameter tbfld_strg correctly. But all my testing has been fruitless. Am I missing something?
    I have googled for hours but still not found a solution
    Peter
      CALL FUNCTION 'BUS_MESSAGE_STORE'
        EXPORTING
          arbgb      = 'ZISU                '
          msgty      = 'E'
          txtnr      = '927'        " PO BOX may only contain digits
          msgv1      = space
          msgv2      = space
          msgv3      = space
          msgv4      = space
          tbfld_strg = 'ADDR1_DATA-PO_BOX'.

  • Need to focus a particular field in OAF screen

    Hi,
    I have created a simple search page. Now based on the search criteria entered records will be displayed in tabular format. In Each row there are only two fields updatable. The screen has one ‘SUBMIT’ and one ‘SAVE’ button. Now while clicking on the save button it is not required that user enters values in all updatable fields. But while clicking on the submit button it is necessary that users enters values in all updatable fields. The button functionality is as follows
    1.     Clicking on Save button saves data into the underlying table(VO is created on that table).
    2.     Clicking on submit updates some other table by calling a PLSQL procedure.
    Now my requirement is to put the cursor in that row where there is no value when user clicks on the submit button. If there are multiple rows which have null value in the updatable fields cursor will be placed in the first row where there is NULL value.
    I am very new to OAF so i am not sure if there is any setcursor or setfocus method in OAF which i can use in my
    processrequest()
    Please help me out and thanks in advance……
    Thanks
    Subhabrata

    Hi Gaurav,
    Thanks a lot for your quick response.But in my page all the records are being shown in a tabular format and in that table say 51 th row has a null value in its updatable field so when user clicks on submit button
    1. i need to search which row has null value in its updatable field.
    2. i need to place my cursor in that field.
    Another issue i am facing with my search page
    I have a date from and date to parameter in that page.Now i have created a LOV regoin based on a VO and in that VO i am retrieving both from date and to date by SQL query.
    Now in the main page DATEfrom parameter i have attached the External LOV Regoin and in the LOV mapping i have created two mapping.
    1.DateFromMap: LOV Region Item:StartDate
    Return Item:Datefrom
    Criteria Item:DateFrom
    1.DateToMap: LOV Region Item:EndDate
    Return Item:DateTo
    Criteria Item:DateTo
    The DateTo parameter is a messagestyledText type field and search Criteria is set to true.
    Now In the LOV regoin when i am selecting any from date value the to date is being populated as per the LOV mapping but when i am clicking on 'GO' button the To Date is automatically being set to NULL.
    Please help me to resolve these two issues.
    Thanks
    Subhabrata Dasgupta
    Edited by: user10816003 on Sep 23, 2009 2:47 AM

  • Text Area steals Focus from Text Field when selected with mouse

    I have created a very simple form with 4 spry validation elements here :: http://octopusdesign.net/contactus.html
    When I attempt to select the 'Your Email' text field using the mouse, focus is grabbed by the text area above it.
    It is only possible to get focus on the 'Your Email' text field by using tab.
    My best guess is that this is a bug in the framework.
    In addition to updating my spry libraries to 1.6 from 1.4 I've tried the following things::
    Reordering the elements in the form.
    Creating the elements in a different order.
    Replacing the validation elements with ordinary elements.
    None of these fixed the problem.
    Strangely, if I remove the validation text area there is no problem.
    If anyone can shed some light on this I would really appreciate it.
    Wisdom gratefully received.
    Chris

    Furthermore ::
    I've tried to reconstruct the form from scratch and discovered that if you have a validation text field and a validation text area in any order on the form, selecting the 2nd element with the mouse always results in the first element stealing the focus.

  • Setting Focus in Text Field of Dynamic Form

    I have a form that has a dynamic section that allows a user to add or delete a request. It this form there is by default one request. At the end of the section I have a button that says "ADD ADDITIONAL REQUEST" that will load another instance of the repeatable section. I want to be able to fill out the first request and click on the ADD button and when the new repeatable section displays the cursor should be active in the first text field of the new instance. Does anyone have any idea how to do this? Thanks in advance for the help!

    You can check to see if it contains a string once by using the contains function, but there isn't a very clean way to do what you want. If you wanted to guess at the maximum number of occurrences, then you could:
    Box A has your initial. Set Box B to do a concat of string-before and string-after of Box A where it copies Box A minus the string we're looking for. Then we have Box C that does the same thing to Box B. Repeat as many times as you see necessary.
    Example:
    String: "1"
    Box A - "123451234512345"
    Box B - "23451234512345"
    Box C - "2345234512345"
    Box D - "234523452345"
    etc.
    We then have a field that has nested ifs looking backwards from Z -> A looking for a non-blank. Based on that, we return the number of occurrences. Again, this isn't clean, but it will work if you think there's a predefinable maximum.
    Andy Wessendorf SharePoint Developer II | Rackspace [email protected]

Maybe you are looking for

  • Hp photosmart premium all in one -won't let me AirPrint

    I have today bought this printer, which according to apple and HP is AirPrint enabled. I've installed it, I've checked for firmware updates and it works fine with my laptop and the eprint function. However, my iPad and iPhone can not find it and so I

  • Menu not showing up in Firefox

    http://donohuedesign.com/cobalt/ The roll over menu buttons (near top of page) are created by embedding an image in the CSS. Doesn't show properly in Firefox (Win and Mac). The solution is driving me nuts - any help is appreciated. Thanks, Jim

  • Help me!!!! my itunes library and play list are disappearance!!! Please!! 50gb of music!!

    Help me!!!! my itunes library and play list are disappearance!!! Please!! 50gb of music!!

  • Install Error 1714

    I currently have Adobe Acrobat 6.0 Standard on my PC running Windows XP.  I want to upgrade and have downloaded the trial version of Adobe Acrobat 9.0 Pro.  During the install I received "Error 1714" "The older version of Adobe Acrobat 9 Pro cannot b

  • CAF Entity date mapping

    Hi Experts, I have created an entity service with remote persistensy(web service).I am mapping a data field from entity service to a date filed in external service(web service).In web service, date is declared as java.sql.date. i mapped to minimum va