Simple javascript APEX question

Hello,
I am new to oracle APEX and am trying to complete an application but have one small issue. I am using a barcode gun to check in servers and other hardware, and once it is scanned it sends an "enter" to add the next row in my Master-Detail form. The code i am using for this is : onkeydown="javascript:if(event.keyCode==13){event.keyCode=9;return event.keyCode}" This works fine, it takes my enter from the barcode and tabs it to the next line. However at a different part of the form I need to make it convert my enter to a tab, and then back to an enter. Essentially I need it so that I scan the barcode, it then submits an enter, which is converted to a tab, and then I want it to then use an enter key. I cannot get this to work. My java skills are lacking, and this is what I have come up with:
onkeydown="javascript:if(event.keyCode==13){event.keyCode=9;return event.keyCode;event.keyCode=13;return event.keyCode}" This is just not working, any ideas on what I can do?
Thanks
Aaron

let me clarify, I have a master detail app. basically, the master holds all the racks for a datacenter, and the details page holds all the hardware within each rack. this means i can click on rack A1, and then see all hardware within that rack. when I am creating a master record, i need it so that I can just scan the rack barcode and move on to the next one. The problem is, after typing in a rack name (not even with scanner) and pressing enter, it auto cancels my rack entry. I have tried changing text field to submit on enter, and even tried java to the dosumbit('Apply_changes_add') with no luck. The easiest way for me to implement this is to have it so that on this form element (rack_name), when you press enter, it converts to a tab (which moves the cursor to the (create rack button) and then presses enter (to submit this page). I agree that this may not be the best way of fixing this issue, but I have no other way of going about it. any suggestions?

Similar Messages

  • Can I have a conditional javascript:apex.confirm when column is null

    Hi All,
    I am relatively new to the product but am picking up things all the time. I was recently asked to create a confirmation on submit dialog which I did quite easily using javascript:apex.confirm. I was then asked to only display the confirmation message if a comment column was empty. The column is optional but it is preferred if something is added. I am using 4.1.1. Is this possible? Any ideas would be appreciated
    Regards
    Chris

    Hello Chris,
    >
    user4023958 wrote:
    I am relatively new to the product but am picking up things all the time. I was recently asked to create a confirmation on submit dialog which I did quite easily using javascript:apex.confirm. I was then asked to only display the confirmation message if a comment column was empty. The column is optional but it is preferred if something is added. I am using 4.1.1. Is this possible? Any ideas would be appreciated.
    >
    How have you implemented the apex.confirm?
    <ul>
    <li>If you have done it in dynamic action on button click then you have to make the dynamic action conditional by using Item/Column value is not null condition with expression as your comment item say P1_COMMENTS</li>
    <li>If you have done it in Button Action as Redirect to URL then simply you can write a javascript function in your page header as :
    <script type="text/javascript">
    function f_showConfirm () {
      if ($x('P1_COMMENTS').value == '') {
        apex.confirm('Do you want to submit this page?', 'SUBMIT');
      } else {
        apex.submit('SUBMIT');
    </script>and call this javascript function in Button Action - Redirect to URL with URL Target set as:
    javascript:f_showConfirm();</li>
    </ul>
    In order to get accurate/appropriate response you should include relevant details from following information with your question:
    <ul>
    <li>Full APEX version</li>
    <li>Full Database version</li>
    <li>APEX Web server architecture (EPG, OHS or APEX listener)</li>
    <li>Browser(s) and version(s) used</li>
    <li>Operating system with version, architecture(32/64)</li>
    <li>Theme</li>
    <li>Template(s)</li>
    <li>Region/item type(s)</li>
    </ul>
    The above information will help the forum members to ascertain the problem context and post most relevant response.
    Please read the [url https://wikis.oracle.com/display/Forums/Forums+FAQ]FAQ and [url https://forums.oracle.com/forums/ann.jspa?annID=1324]forum instructions for more information on using OTN forums effectively.
    Please update your forum profile with a real handle instead of user4023958.
    Hope it helps!
    Regards,
    Kiran

  • How to apply a simple javascript into JSF

    Hi everyone. This is my first time using JSF and i am abit confuse in applying some simple javascript into my JSF. Actually, i just want to add a simple function that is to disable user from input some certain textfield (h:inputText) based on the selection in the combo box (h:selectOneMenu).
    The javascipt that i would like to apply in the JSF coding is shown as below:-
    <HTML>
    <TITLE>Example of onChange Event Handler</TITLE>
    <HEAD>
    <SCRIPT LANGUAGE="JavaScript">
    function textField()
    if(document.myform.mcDonald.value=="disable")
    document.myform.data.disabled=true;
    if(document.myform.mcDonald.value=="enable")
    document.myform.data.disabled=false;
    </SCRIPT>
    </HEAD>
    <BODY>
    <H3>Example of onChange Event Handler</H3>
    <form name="myform">
    <SELECT NAME="mcDonald" onChange="textField()">
    <OPTION VALUE="enable">Enable
    <OPTION VALUE="disable">Disable
    </SELECT>
    <input type="text" name="data" value="10" size=10 disabled="true" >
    </form>
    </BODY>
    </HTML>

    You need to use the id's of the components in the hierarchy. This is actual working code:
    // Javascript
              function actionedStatus_onchange(formObj, fieldValue) {
                   formObj.elements['foureye:tabExceptions:unresolvedOnly'].disabled = (fieldValue != 'all');
                   formObj.elements['foureye:tabExceptions:unresolvedOnly'].checked = (fieldValue == 'all');
    // JSF
                   <x:selectOneMenu id="actionedStatus" styleClass="detailBondField" value="#{exceptionsBean.actionedStatus}"
                             onchange="actionedStatus_onchange(this.form, this.value)">
                        <f:selectItems value="#{lookupBean.actionedStatusList}"/>
                   </x:selectOneMenu>
    In this case, the root component form is 'foureye' (a subview), followed by 'tabExceptions' (a form), followed by a checkbox 'unresolvedOnly' that I want to manipulate. Here I am disabling the checkbox and setting the value dependent on the value of the selectOneMenu

  • Simple Javascript to set date

    Hello,
    My simple JavaScript to set the date runs in Acrobat Pro but when I open the same document in reader it set the date but it fails with a dialog pop out of getField error... here is the script followed by the error...
    function populate_date()
    var f = this.getField("ToDay_Date");
    if (!f.value) f.value = util.printd ("m/d/yyyy", new Date());
    populate_date(); // call my function
    Above scripts run when document is opened... In Pro it is stored under Tools/JavaScripts/Document JavaScript...
    When I open it in Reader then I get the following while it set the date on the date filed too!
    Acrobat EScript Built-in Functions Version 11.0
    Acrobat SOAP 11.0
    TypeError: this.getField is not a function
    2:Folder-Level:App:Search Script.js
    What am I not setting right that I get this error...
    Regards,
    Jeff P.

    Hi,
    No it did not do and did not help still same error came out... Let me ask you this... this is a combination of 6 pages of 5-6 forms that this field of "ToDay_Date" is repeated at least 4 times on 4 pages of this combined form and it really populates all the repeated "Today_Date" on all pages in PDF Pro and  Reader but while it does not pop up the error dialog on PDF Pro and runs with no problem but in Reader it pup up the error dialog even after populating all the repeated fields!  Could it be because field has been repeated?  How come it runs and populates all the fields but also gives the error?  I think it is a bug in Reader... don't you think so?
    Regards,
    Jeff P.

  • Getting Exception: @Scratchpad/1:1 exception while running simple javascript code in mozilla scrachpad

    getting Exception: "@Scratchpad/1:1 exception" while running simple javascript code in mozilla scrachpad

    Does this also happen if you run the code in the Web Console (Firefox/Tools > Web Developer)?
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Simple javascript not working

    Hello,
    I have got a problem with this simple javascript that works
    on every browser I tested but not on AIR (1.5.0 on Aptana Studio) :
    <html>
    <head>
    <title>Test</title>
    <script type="text/javascript">
    function init()
    display();
    var nb=10;
    function del()
    nb--;
    display();
    function display()
    var i;
    var res = "";
    for (i=0; i<nb; i++)
    res += "<li><a onclick=\"del();\">link"+ i
    +"</a></li>";
    document.getElementById("results").innerHTML = "<ul>"+
    res +"</ul>";
    </script>
    </head>
    <body onload="init()">
    <p onclick="del()">test</p>
    <div id="results"></div>
    </body>
    </html>
    Clicking on any link in the list should reload this list with
    one item less, but it only works once, I do not understand why
    considering this code perfectly works on any browser.
    Clicking on the "test" text in the <p> also works
    perfectly and I have got no error message in the console, so what
    is the problem, please?
    Thanks for your help.

    Unsure what the problem is. I copied almost verbatim and it
    worked fine for me.
    here's my script (slightly different due to my base file is
    xhtml strict)
    quote:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
    http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="
    http://www.w3.org/1999/xhtml"
    xml:lang="en" lang="en">
    <head>
    <title>Adobe Air 1.5 Test</title>
    <script src="lib/AIRAliases.js"
    type="text/javascript"></script>
    <script src="lib/main.js"
    type="text/javascript"></script>
    <script type="text/javascript">
    function init(){
    display();
    var nb=10;
    function del(){
    nb--;
    display();
    function display(){
    var i;
    var res = "";
    for (i=0; i<nb; i++)
    res += "<li><a onclick=\"del();\">link"+ i
    +"</a></li>";
    document.getElementById("results").innerHTML = "<ul>"+
    res +"</ul>";
    </script>
    </head>
    <body onload="init();">
    <p onclick="del()">test</p>
    <div id="results"></div>
    </body>
    </html>

  • Simple X-fi Question, Please Help

    !Simple X-fi Question, Please HelpL I've been looking for an external sound card that is similar to the 2002 Creative Extigy and think I may found it in the Creative X-Fi. I have some questions about the X-fi though. Can the X-fi:
    1. Input sound from an optical port
    2. Output that sound to 5. surround- Front, surround, center/sub
    3. Is the X-Fi stand-alone, external, and powered by a USB or a wall outlet (you do not need a computer hooked up to it)
    Basically I want to connect a TosLink optical cable from my Xbox to the X-Fi. That will deli'ver the sound to the X-Fi. Then I want that sound to go to a 5. headset that is connected to the X-fi via 5. front, surround, and center/sub wires. The X-Fi has to be stand-alone and cannot be connected to a PC to do this.
    Thank you for your help.

    The connector must match, and the connector polarity (plus and minus voltage) must match.  Sorry, I don't know if the positive voltage goes on the inside of the connector or the outside.    Any wattage of 12 or more should be adequate.
    Message Edited by toomanydonuts on 01-10-2008 01:29 AM

  • Javascript apex.submit

    Hi,
    I am using the Javascript (javascript:apex.submit('TEST')) on the report attributes item (PID). I need to pass the PID value. Can i pass the value of the item in the Javascript
    apex.submit.
    Please suggest how we can pass the value.
    Thanks,
    Vikas

    Vikas,
    In APEX 4.0, we added a new signature for the apex.submit function that does allow setting an item's value. For example, in the column link 'URL' for your PID column, you could specify the following:
    javascript:apex.submit({request:'TEST',set:{'P1_HIDDEN_PID':'#PID#'}});This assumes you have a page item called 'P1_HIDDEN_PID' that stores the specific row's PID value.
    We actually use this technique on the 'Report Attributes' page itself, when clicking a column link to edit a column (to save any changes made to the current page and still branch to the appropriate column edit page). Official documentation on this function can be found in our API reference guide here:
    http://download.oracle.com/docs/cd/E17556_01/doc/apirefs.40/e15519/javascript_api.htm#CHDBEACA
    Hope this helps.
    Anthony.

  • Javascript opoup question?

    My question is
    in window.open() if i give resizable=no and scrollbars=no is working fine in IE but not working in mozilla
    anyone can help?
    Thank You,
    Sreenu.G

    gantinapalli wrote:
    even specifying the width and height also it's not workingYou did something wrong.
    This example works in all browsers here:
    <html>
        <head>
            <title>Test</title>
        </head>
        <body>
            <button onclick="window.open('http://google.com', 'test', 'width=500px, height=300px, resizeable=no, scrollbars=no')">test</button>
        </body>
    </html>And in the future please post Javascript related questions at a Javascript forum. This has nothing to do with JSF. There are JS forums at dynamicdrive.com and webdeveloper.com.

  • Simple Crop tool question... how do I save the crop section?

    Hi,
    I have a very simple crop tool question. I'm a photoshop girl usually... so Illustrator is new to me. When I select the crop section I want... how do I save it?... if I select another tool in the tool panel, the crop section disappears and I can't get it back when I re-select Crop tool. If I select Save as... it saves the whole document...and not just my crop section.
    Like I said, simple question...but I just don't know the secret to the Illustrator crop tool.
    Thanks!
    Yzza

    Either press the Tab key or F key.

  • A Simpler, More Direct Question About Merge Joins

    This thread is related to Merge Joins Should Be Faster and Merge Join but asks a simpler, more direct question:
    Why does merge sort join choose to sort data that is already sorted? Here are some Explain query plans to illustrate my point.
    SQL> EXPLAIN PLAN FOR
      2  SELECT * FROM spoTriples ORDER BY s;
    PLAN_TABLE_OUTPUT
    |   0 | SELECT STATEMENT |              |   998K|    35M|  5311   (1)| 00:01:04|
    |   1 |  INDEX FULL SCAN | PKSPOTRIPLES |   998K|    35M|  5311   (1)| 00:01:04|
    ---------------------------------------------------------------------------------Notice that the plan does not involve a SORT operation. This is because spoTriples is an Index-Organized Table on the primary key index of (s,p,o), which contains all of the columns in the table. This means the table is already sorted on s, which is the column in the ORDER BY clause. The optimizer is taking advantage of the fact that the table is already sorted, which it should.
    Now look at this plan:
    SQL> EXPLAIN PLAN FOR
      2  SELECT /*+ USE_MERGE(t1 t2) */ t1.s, t2.s
      3  FROM spoTriples t1, spoTriples t2
      4  WHERE t1.s = t2.s;
    Explained.
    PLAN_TABLE_OUTPUT
    |   0 | SELECT STATEMENT       |              |    11M|   297M|       | 13019 (6)| 00:02:37 |
    |   1 |  MERGE JOIN            |              |    11M|   297M|       | 13019 (6)| 00:02:37 |
    |   2 |   SORT JOIN            |              |   998K|    12M|    38M|  6389 (4)| 00:01:17 |
    |   3 |    INDEX FAST FULL SCAN| PKSPOTRIPLES |   998K|    12M|       |  1460 (3)| 00:00:18 |
    |*  4 |   SORT JOIN            |              |   998K|    12M|    38M|  6389 (4)| 00:01:17 |
    |   5 |    INDEX FAST FULL SCAN| PKSPOTRIPLES |   998K|    12M|       |  1460 (3)| 00:00:18 |
    Predicate Information (identified by operation id):
       4 - access("T1"."S"="T2"."S")
           filter("T1"."S"="T2"."S")I'm doing a self join on the column by which the table is sorted. I'm using a hint to force a merge join, but despite the data already being sorted, the optimizer insists on sorting each instance of spoTriples before doing the merge join. The sort should be unnecessary for the same reason that it is unnecessary in the case with the ORDER BY above.
    Is there anyway to make Oracle be aware of and take advantage of the fact that it doesn't have to sort this data before merge joining it?

    Licensing questions are best addressed by visiting the Oracle store, or contacting a salesrep in your area
    But I doubt you can redistribute the product if you aren't licensed yourself.
    Question 3 and 4 have obvious answers
    3: Even if you could this is illegal
    4: if tnsping is not included in the client, tnsping is not included in the client, and there will be no replacement.
    Tnsping only establishes whether a listener is running and shouldn't be called from an application
    Sybrand Bakker
    Senior Oracle DBA

  • Simple javascript code?

    hello -
    i'm trying to insert some simple javascript into a flash file
    to test how it works.
    within the html file, i have this code:
    <script language="JavaScript">
    function mycallback(value) {
    alert("hello world! - " + value);
    </script>
    what should my action/javascript code look like in my flash
    file?
    here is just a html version of how i want it to work:
    http://www.dkwong.com/example_js.html
    thanks!

    Well, more the advanced features you need, you'll have to compromise somewhere! The code on the link I gave you is about 5KB. When you minify it, it is about 1.4KB.
    Copy the code, use http://jscompress.com/ to minify the code. Include it in your page then.
    -ST

  • Javascript/HTML question

    I've been teaching myself Java on and off for the past couple years with the help of these forums and other tutorials. Now I've decided to take on a project that requires the use of HTML and Javascript and I can't seem to find the information I need. I was hoping that somebody from these forums could either answer my questions and/or point me in the right direction to find the answers.
    The project is simple. I created an HTML window with an inputTextArea, an outputTextArea, and two buttons (Submit and Reset). When Submit is pressed I need the program to take the text from inputTextArea one line at a time, check the indexOf a string, and add tags at the beginning and end of the string if it meets certain criteria before appending it to outputTextArea.
    I can (and have) written this very easily in Java but I can't seem to find the methods I need in Javascript. In java I use a java.io LineReader to read the inputTextArea.getText() one line at a time and then make the changes as needed. I actually can't even find a tutorial in Javascript that can explain how to take the text from inputTextArea and print it into outputTextArea.
    So the main thing I need to know is how to read one line of text at a time from the inputTextArea. I think I can figure the rest out.

    That was actually my original thought when I started on the Java version of the program but I couldn't figure out how to enter the the carriage return in as a variable to be indexed. So it wasn't until after I found the LineReader that I was able to complete the Java version.
    Is there some way to enter the carriage return in as a searchable variable?

  • OBIEE 11g: Dashboard not invoking simple javascript alert

    Hi Experts,
    I'm trying to invoke one simple ALERT command with javascript in obiee 11g dashboard. The purpose is when it loads, it should print one ALERT message and also when we change something in the prompt and clicking Apply button.
    Here is code written in a text item (Checked html markup option) after prompts;
    <script language="Javascript">
    alert ("Hello");
    </script>
    The Javascript alert message is showing when the dashboard page loads, but its not coming when we click the Apply button after changing the prompts.
    Can anyone give helpful hint, how to check it and why its not showing up when we press Apply button?
    Any hint or some useful links will b highly appreciated.
    Thanks in advance.

    You just used code and I would say the default event is onload of the page, thats the reason you are able to see alert.
    Since you didnt ask or written code onClick event to show alert, its not showing.
    You need to tell to browser when to prompt alert message instead of onload.
    Hope you are more confuse about 'how to do'
    if yes, mark :)
    give some more info about your actual req. that helps any other gurus to help.
    Edited by: Srini VEERAVALLI on Mar 27, 2013 8:42 AM

  • Simple Java SDK question for server group assignment

    I have a snippet of code below in which I am trying to apply the setProcessingServerGroup() and setProcessingServerGroupChoice() methods to my report object. My question should be relatively simple: I believe I need to cast(?) my iObject report object to iProcessingServerGroupInfo per the API in order to use the setProcessingServerGroup() and setProcessingServerGroupChoice() methods, but I'm not sure how to do so.
    Can someone please advise how to cast my iObject to iProcessingServerGroupInfo?
    Thanks in advance...
    Code:
    IInfoObject iObject = (IInfoObject) childReports.get(i); 
    int sgID_view = Integer.parseInt(serverGroupID_view);
    int sgPref_view = Integer.parseInt(serverGroupPref_view);
    !!!!!  CONVERSION / CAST NEEDED HERE !!!!!
    iProcessingServerGroupInfo.setProcessingServerGroup(sgID_view);
    iProcessingServerGroupInfo.setProcessingServerGroupChoice(sgPref_view);

    To followup, I've been able to cast to IShedulingInfo in order to use the setServerGroup() and setServerGroupChoice() methods successfully:
    IInfoObject iObject = (IInfoObject) iObjects.get(i);    
    ISchedulingInfo iSchedulingInfo = iObject.getSchedulingInfo();
    iSchedulingInfo.setServerGroup(427);
    iSchedulingInfo.setServerGroupChoice(2);
    But I don't know how to perform the cast to be able to access the setProcessingServerGroup(), sterProcessingServerGroupChoice() methods.
    Any help appreciated.
    Thanks!

Maybe you are looking for

  • 2008 R2 NPS wont connect to Cisco 1841 via Cisco VPN 5.0.03.0560

    I am migrating our IAS server from 2003 R2 to 2008 R2 NPS that we use to authenticate VPN conenctions through AD. Currently works without issue on 2003 R2 server. Does not want to work on 2008 R2 NPS server. We are using Cisco VPN client 5.0.03.0560

  • Quality of quicktime export

    Me again, enjoying FCE and with another question. I exported my first project to a Quicktime movie, going to Export>Quicktime Movie. When I change the view to fill my large iMac screen, it gets pixelly, and I guess that should be no surprise. This is

  • Printout of Changed PO Line items with Quantity and value

    Hi SAP Gurus, I want to have the printout of  only those PO Line items with the change in Quantity and Value.... How can i achieve this... Any config./ Developement... Plz. suggest.... Rgds, Navin

  • Remove underline from hyperlink in Mail.

    How can I remove the underline from hyperlinks in Mail? Thanks in advance!

  • SCCM 2012 R2 Discovery not returning results

    When the site was first setup computers and users were discovered. Now when I run it I do not get any of the new systems. When I go to look at the AD*.logs there are none. How can that be?