Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    Having the cursor focussed on an input field in WWW OPAC

    • Article Type: General
    • Product: Aleph
    • Product Version: 16.02

    Description:
    In the advance page (find-a) the cursor does not automatically appear in the starting field.

    The baisc page (find-b) and the CCL (find-c) DO have the cursor on the field. Why does it not automatically appear on the advanced page. I have checked out other sites: MNPals, SDLN, Univ on MN and they too do not have the cursor automatically. Univ of Michigan and Duke do have it in automically. I have tried several javascripts that I have found on the web to try to make this happen and I can't get any of them to work for us so I would guess the coding is deeper than just the web and java or html.

    This is in TEST (http://libserv1.odin.nodak.edu:8991/F) and PROD (www.odinlibrary.org).

    Can you possibly give me some help or an explaination.
    Nadine Kotowicz
    nadinekotowicz@mail.und.nodak.edu
    [ <Mary Ren > ]
    [ <Mary Ren > ]

    Resolution:
    If you want the pages to have the cursor “focused” on a specific input field you can do this by editing the html.
    If it is not in the specific field then if you want the cursor in the specific field you can add a Java script.
    If for example the cursor is not in the file $alephe_root/www_f_eng/find-d (advanced search in demo version), to add it make this change: (example also of how to do this is at http://javascript.internet.com/page-details/focus-onload.html )

    Below there is a slight amendement because we have 3 elements that are named "request".

    <script language="Javascript">
    <!--
    function my_reset()
    {
    for (var i = 0; i< document.form1.elements.length; i++) {
    if (document.form1.elements[i].name == "request") {
    document.form1.elements[i].value = "";
    }
    }
    }
    function request_focus()
    {
    for (var i = 0; i< document.form1.elements.length; i++) {
    if (document.form1.elements[i].name == "request") {
    i=document.form1.elements.length; }
    }
    }
    // -->
    </script>
    </head>
    <body topmargin="0" onload="javascript:request_focus();">


    • Article last edited: 10/8/2013
    • Was this article helpful?