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.

Similar Messages

  • 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

  • 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

  • Cursor  Focus issue

    Hello Everyone,
    I have added a remember my username checkbox with login box.
    If somebody clicks the checkbox it remembers the username.
    However, the cursor remains with the first item ie. username.
    I want to change the cursor focus to password field if username
    field is not null.
    Can anybody help me in setting the tabindex property for password field.
    I want to set the tabindex in my plsql procedure.
    Thank You,
    Parveen

    You can do that in your page header Javascript code as follows:
    function first_item(){
    if (document.getElementById("PX_USERNAME") )
    document.getElementById("PX_USERNAME").focus();
    else
    document.getElementById("PX_PASSWORD").focus();
    }where PX_USERNAME and PX_PASSWORD are your username/pwd fields...and then in your page HTML body code put :
    onLoad=first_item();Thanks,
    Sam

  • Set cursor on error field in selection screen

    Hi ALL,
    How to place the cursor on a particular selection screen field?I am doing validation if validation fails for a particular field the program should give error mesg and the cursor should place on the error field only but it's going to the Ist field on the selection can somebody tell me how do this? I tried with set cursor field <fieldname) but not working I am doing validations on at-selection screen.
    Thanks&Regard
    mahesh

    Hi chandrasekhar find my code below
    this code i am writing under  at selection-screen.
    *&      Form  Z_VALIDATE_TVKOV
    FORM z_validate_tvkov .
      DATA: i_vtweg LIKE vbak-vtweg.
      IF NOT s_vtweg-low IS INITIAL.
        SELECT SINGLE vtweg FROM tvkov INTO i_vtweg
                     WHERE vtweg = s_vtweg-low.
        IF sy-subrc <> 0.
        set cursor FIELD 'S_VTWEG-LOW'.
        MESSAGE e000(z_sd) WITH text-052.
        ENDIF.
       ENDIF.
      IF NOT s_vtweg-high IS INITIAL.
        SELECT SINGLE vtweg FROM tvkov INTO i_vtweg
                            WHERE vtweg = s_vtweg-high.
        IF sy-subrc <> 0.
          MESSAGE e000(z_sd) WITH text-052.
        ENDIF.
      ENDIF.
    ENDFORM.                    " Z_VALIDATE_TVKOV

  • Updated - Cursor focus in HTML text field in JEditorPane

    The last poster just save my bacon - so an update for others: Adding a JEditorPane to a JWindow will result in all the <INPUT type=text> form elements to be non focusable. Switching to JFrame does make things work again - but I would love to have a JWindow again (I don't want the title bar for a kiosk type operation).
    thanks!
    brian
    Here is the guy I do thank!!!
    ** PROBLEM
    How do I make cursor focus go into an HTML text field in a JEditorPane?
    My test appplication is a JPanel containing a JEditorPane and nothing else. The content type is text/html. The HTML text contains a form and an INPUT TYPE=TEXT tag. I use setEditable(false) because I do not want the user to edit the paragraph text, only to type in the text field.
    The text field does not get cursor focus. Tab does nothing. The user can click with the mouse to place focus in the text field, so the field is capable of receiving focus. I guess the field is in a View that stops it participating in the component hierarchy.
    Is there a way to make this work?
    ** SOLUTION! - ok, if you don't use JWindow
    It turns out that setEditable(false) is not enough. The JEditorPane still gets in the way of the focus cycle. It also needs setFocusCycleRoot(false) and setFocusable(false) to prevent it from participating in focus. Focus on the text field then works normally.
    fp

    I don't want the title bar for a kiosk type operation).You could use an undecorated frame. Read the API for more info.
    Or, maybe this posting will help:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=675445

  • Cursor out of focus after error message

    Hi,
    We have build an application using forms 6i.
    When using the application sometimes after getting an errormessage in a form the cursor stays in a field( after acknowledging the message) and can't move to another field. Also navigating to a poplist shows the values but when releasing the mousebutton it jumps back to the original field.
    I can't reproduce this behaviour at will but it just sometimes occurs. Nothing helps but stating the browser again.
    Has anybody experienced this behaviour?
    Does anybody have any clue where to look?
    Regards,
    Joshua

    Check these things before you do anything with your system:
    *How is the drive formatted?* If it's FAT32, that's the problem and you will have to reformat the drive as Mac OS Extended to use it with Final Cut Express. But make sure you *back up your files first*, because reformatting erases the entire disk.
    *How is the drive connected* - Firewire or USB? If Firewire, are there any other Firewire devices connected, especially a camera. If so, disconnect the camera.
    What is the exact make & model of your external hard drive?
    Are you using this external hard drive as a *Time Machine backup drive?* If so, you should *turn off* Time Machine before you export to this drive. Actually, you should not use a TM backup drive at all for video projects.

  • Error: Field BNKA-BNKLZ . is not an input field

    Dear Experts,
    My client following vendor creation process is as follows
    Requestor logs his request into EP -> it is recorded into MDM -> after approval from central team, it syndicate into SAP -> Idoc entry -> Table entry
    Now in case of vendor request comes with bank data, Idoc gets failed with error message u201CField BNKA-BNKLZ . is not an input fieldu201D
    Message no. 00347
    Diagnosis:
    A transaction is processed using batch input.
    System Response:
    The runtime error field xxx occurs (invalid entries)
    Procedure:
    Correct the batch input data. Depending on the processing scenario, this can affect either of the following objects:
    Batch input session
    CATT procedure
    Application program
    If I reprocess this Idoc in foreground mode in Tcode: WE19 it is getting successfully posted.
    Kindly help me to resolve this issue.
    Regards,

    Can it be that you have bank data in your vendors for banks that are not yet created.
    if you create vendors manually then SAP is creating the bank master record automatically in background if not present when you entered bank data in the vendor master.
    But in IDOC processing, SAP just focus on the master data transferred with the IDOC, it creates vendor masters, but it does not create  central address data  nor bank data.
    you have to create the banks as a preceeding step to vendor creation.

  • 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

  • How to put cursor in a text field

    hi,
    I have a text field in my jsf page.By default I want to put the cursor into this text field.when a letter is entered into this text field,the data table below this text field must change depending upon the value entered into the text field.After this change also,the cursor must be in the same text field.
    how it is possible.
    when I entered any letter in this field,there is a call to the server.the cursor must be in that textfield after the call.

    Use DOM+JS.
    With element.focus() you can set the focus on the desired element.
    With the 'onkeypress' attribute you can execute some piece of Javascript on every key press, for example submitting the form or doing an AJAX request.

  • Error "field required" in master-detail form with FORMS 10G!!

    I have a Master-Detail Form.
    When the cursor stay in detail block and i chage the master record with the mouse, clicking in scroll bar, i get error "field required".
    In Forms 6i, works fine!!

    Master block has more than one record displayed. When I click on any item in detail (except first one) and then click on different master record (return navigation to master block, but not current record) I have FRM-40202: Field must be entered on first item in detail block.
    I found that reason is this part of clear_all_master_details procedure (automatically created by Oracle Forms):
    IF :System.Cursor_Item <> startitm THEN
    Go_Item(startitm);
    Check_Package_Failure;
    END IF;
    Does any have same experience?
    Is it Oracle bug or I am missing something?

  • Cursor focus in search iView

    Hello together
    We integrated the KM search iView in an own navigation element. We are not using the ToolArea search.
    When we click on this Search navigation element the search iView is shown but the search field doesn't have the focus for the cursor. For searching we need every time a mouse click moore to put the cursor into the search field.
    Can this somewhere be activated, that the search iView field has automatically the focus?
    In normal HTML pages this can be done with JavaScript like this:
    <script language="JavaScript" type="text/JavaScript">
      <!--
      document.search.fieldname.focus();
      -->
    </script>
    How did you solve this problem? Any suggestions?
    Thanks for answers.
    Regards,
    Stefan

    We have implemented SP20 a couple of month ago but this issue has not been resolved yet.
    In fact, when the search iView is shown, it seems like the Search field is getting the focus but somewhat loosing it after a fraction of a second. Now the user may type into the text box but if he uses the Space bar it submits the form.
    In other words, if the user does not explicitly set the focus to the text box, the "Space" acts like "Enter" and submits the form.
    Any idea?

  • Bug: No Cursor Focus with Instant Preview Message Replies

    When you receive an Instant Preview Message and click on this notification (not shortcut reply but click on the notification itself for bbm or text messages) this brings you into the Hub to reply to that message. 
    The cursor focus is now in the reply field blinking however the typing focus is not here. You must explicitly click in the reply field to re-set the cursor focus. Now you can type to reply.
    Is this a known bug? Is there a fix?
    Blackberry Q10
    OS Version: 10.2.0.1803

    cor-el, Thank you for the quick response. However, I am not a techie by any stretch and am totally disabled. Your answer basically made no sense to me, sorry. I also have something called Session Manager, in this case irrelevant as my FF page never stayed up long enough for me to do anything even to click on Restore.
    I have in the meantime, simply reverted back to an installation of 3.6.8 and everything is working fine right now. I hope others will find benefit from your response as it is way too deep for me to venture.
    Thank you again for your response.

  • WebDynpro Popup Cursor Focus Problem

    Hello WebDynpro experts,
    since CE7.1 (SP6) I am observing that an input field refuses to take the cursor focus after calling a popup window for a lookup.
    Only after some seconds the cursor appears again. Clicking the right mousebutton in this input field the cursor appears at once.
    It only happens on Internet Explorer. It does not happen in Firefox(but again when applying IE engine in Firefox).
    In some environments (different company, different IE settings) it works fine.
    This did not happen in NW04S/7.0.
    Does anyone know the reason, a fix or a workaround.
    Has it to do with JavaScript-settings?
    Thanks a lot for Your answers,
    Erik

    Hi
    [Follow this|requestFocus() doesn't work anymore in NW CE 7.1;
    Best Regards
    Satish Kumar

  • Remove cursor focus

    I have a page with a bunch of checkboxes..
    (enough that the page has to be scrolled)
    at the bottom of all of the check boxes is a text field..
    when the page is run the cursor jumps to the text field at the bottom of the page..
    how do I keep it from setting the cursor focus to the text field so the page opens at the top instead auto scrolling to the bottom..

    In the page properties look for: Cursor Focus. What is it set to?
    If it's set to the first item and the page is still scrolling to the bottom, try changing the cursor focus to "Do Not Focus Cursor" and then write a JS function to set the cursor to your first checkbox.
    Martin

Maybe you are looking for

  • Calling Report from a Form

    Hi All, I tried to call a report from a form (using this form as a parameter form)but unfortunately it is not working out for me. I used the run_product built in. Could someone examine my code and tell me what is wrong? DECLARE pl_id ParamList; BEGIN

  • Multiple Datasource creation in Production system

    We are facing connection pool issues from middleware, is it suggestable to create multiple datasources with same connection

  • "Slave" drive not appearing

    So I just tossed a couple new HD's in my G4. The drives are: 1 - 120GB hooked up to G4's built in IDE cable 1 - 320 GB Drive hooked up to IDE Controller card as primary/master drive and both show up w/ no issues on boot BUT then here's where it gets

  • Where can I get the source code of Text Layout Editor?

    Hi, Guys: I just want to design horizontal or vertical rulers that are exactly same as the one I see in the Text Layout Editor. Please see the url: http://labs.adobe.com/technologies/textlayout/demos/ But I cann't download any source code. Does anyon

  • It may be a bug?

    My english is very pool, and I'm an archlinux newbie ,but I want to tell something: It may be a bug? Because I had to write something like "pppoe-start" and "startxfce4" every time when I login(I use init 3 in my /etc/inittab),so I try to put them in