How to use javascript in apex application?

hi,everyone
I learn the apex, I want to develop the app,but page need accumulate the select items in client,and show the value in another text Field. For instance, there are 10 Select Lists in page, every select list has 3 values(Y\N\NA),the text Field need to accumulate the 'N' value of 10 Select Lists and show result (default is 0)when I change the Select Lists. I know how to real in HTML page by javascript,but no know to use in APEX, please everyone help me ?\
thanks!

thanks,Alan Martini. I finish it. As follows.
<script type="text/javascript">
function getEmployeeInfo(filter)
var ename1 = document.getElementById("P4010008_INTRO_PHASE1").value;
var ename2 = document.getElementById("P4010008_INTRO_PHASE2").value;
var ename3 = document.getElementById("P4010008_INTRO_PHASE3").value;
var ename4 = document.getElementById("P4010008_INTRO_PHASE4").value;
var ename5 = document.getElementById("P4010008_HAN_PHASE1").value;
var ename6 = document.getElementById("P4010008_HAN_PHASE2").value;
var ename7 = document.getElementById("P4010008_HAN_PHASE3").value;
var ename8 = document.getElementById("P4010008_HAN_PHASE4").value;
var ename9 = document.getElementById("P4010008_TOOLS_USAGE1").value;
var ename10 = document.getElementById("P4010008_TOOLS_USAGE2").value;
var ename11 = document.getElementById("P4010008_CLOSING_PHASE1").value;
var ename12 = document.getElementById("P4010008_CLOSING_PHASE2").value;
var ename13 = document.getElementById("P4010008_CLOSING_PHASE3").value;
var val1=0;
var val2=0;
var fatal="pass";
if(ename3==2&&ename4==2)
val1=2;
else if((ename3!=2&&ename4==2)||(ename3==2&&ename4!=2)){
val1=1;
else
{   val1=0; 
document.getElementById("P4010008_SCORE").value=val1;
if(ename1==2)
{ val2++;
if(ename2==2)
{ val2++;
if(ename3==2)
{ val2++;
if(ename4==2)
{ val2++;
if(ename5==2)
{ val2++;
if(ename6==2)
{ val2++;
if(ename7==2)
{ val2++;
if(ename8==2)
{ val2++;
if(ename9==2)
{ val2++;
if(ename10==2)
{ val2++;
if(ename11==2)
{ val2++;
if(ename12==2)
{ val2++;
if(ename13==2)
{ val2++;
if(val2/13.0>0.40)
fatal="fail";
document.getElementById("P4010008_FATAL").value=fatal;
</script>
Edited by: cdavid on 2011-2-18 下午12:57
Edited by: cdavid on 2011-2-22 下午1:42

Similar Messages

  • Can and How to Use JQuary In APex 3.2

    Hi,
    Can we use JQuary in Apex 3.2 .If please send me any link or demo application with code.
    I am New With JQUARY .i don't have any idea about JQuary .
    How to use it in Apex 3.2.
    I am working on Apex 3.2
    Thanks

    Hi,
    JQuery sample is in htmldbQuery_sample.zip.
    File apex_developer_tool_bar.user.js is Greasemonkey script.
    Go to Greasemonkey site and check document how import user scripts.
    http://userscripts.org/about/installing
    Read about htmltooltip.js from
    http://dbswh.webhop.net/apex/f?p=BLOG:READ:0::::ARTICLE:3000
    Read about other files
    http://dbswh.webhop.net/apex/f?p=BLOG:READCAT:0::::CATEGORY:11100346066619
    Regards,
    Jari
    Edited by: jarola on Dec 7, 2010 9:40 AM

  • Using javascript in apex

    I am using javascript in apex, specifically the funtion popupURL. It is doing exactly what I want it to do except I don't want a new window, I want to stay in the same window.
    What is the javascript function that will do the same as popupURL - except it stays in the current window?
    Thanks!
    Stan Collins

    I think sb92075 was suggesting that you might have better luck finding someone with the answer Oracle Application Express (APEX)

  • Help me!! How to use JavaScript with JSP ??

    I am using JDeveloper and I created a screen in JSP which uses a bean for database connectivity and retriving info onto the page.
    The page has a ListBox where list items are populated from the database.My requirement is
    whenever the list is changed the page shuold be refreshed with the selected item info.
    I tried to use 'JavaScript' for triggering the event with 'onChange' event of the ListBox.But the event is not getting invoked. I think JavaScript is not working with JSP.
    Please help me with how to Use javaScript with JSP or any other alternative where I can meet my requirement.
    I have one more question...I have gone through the JSP samples in OTN and I am trying do download the sample 'Travel servlet' which show list of countries...etc
    I have also gone through the 'readme' but I don't know how to extract .jar file.
    I would be great if you could help me in this.
    Thanks!!
    Geeta
    null

    We have a similar need. We have used Cold Fusion to display data from Our Oracle Database. We have a simple SElect Box in HTML populated with the oracle data. When someone selects say the State of Pennsylvania. then we have an On change event that runs a Javascript to go get all the cities in Pennsylvania.
    Proble we are having is that inorder for the Javascript to work , we currently have to send all the valid data.
    Do you know of any way to dynamically query the the Oracle database in Javascript

  • How to use Javascript to load random pages?

    I wonder if anyone knows how to use Javascript to load a list
    of links stored in the text file.
    Every address will take a line, and the Javascript will
    randomly select one of the addresses to load.
    The user will click the button "random" and access the page
    randomly selected by the script.

    Addition note:
    I forgot to say this because my computer froze......(how
    lame)
    I got the code for random accessing the links.
    But now the problem is, is there anyway to parse a text file
    into the array in Javascript?

  • How to use JavaScript in Web bean generated JSP

    I want to do some simple JavaScript validations (for example, checking if a particular field is empty) in the JSP page rendered by the data web bean. Because the HTML is rendered by the bean, I'm not able to refer to the HTML controls in the JSP page. I'm not even able to refer to the form with the following standard piece of JavaScript code - "document.forms[0].control_name".
    Is anybody aware of how to use JavaScript with these rendered JSP pages?

    You just have to add it like and applet , including this line in your JSP or JSF
    <script src="http://dl.javafx.com/dtfx.js"></script>Then add the applet
    <script>
        javafx(
                  archive: "./resources/jar/Draw.jar",
                  width: 400,
                  height: 200,
                  code: "Draw",
                  name: "Draw"
    </script>./resources/jar/Draw.jar - is the path and the name of the jar

  • How to Use JavaScript in Controller Class...

    Hi All,
    Can any one tell me how to use JavaScript in Controller Class.
    Requirement is:
    I have
    Radio Group(RG1),
    Two Radio Buttons(RB1,RB2),
    Two messageTextInput(MTI1,MTI2),
    if i click RB1 i should Prompt to the end user to "Enter value for MTI1" or
    If i click RB2 i should prompt "Enter value for MTI2" while submitting page.
    Please let me know the steps to use JavaScript and the above client validation...
    Regards
    Alem...

    Using javascript is against the standard. I can tell you a workaround instead of you setting the javascript, check if that would be acceptable.
    You can use PPR and set the required property on the messageTextInput on clicking of the radio button. By doing this you will let UIX generate the javascript for you to handle the client side validation. But the validation will happen only on click of the submit button. The visual indicator is good enough to tell that the value has to be entered to the item.

  • How to use Javascript in OBIEE?

    Hi all,
    can any one tell how to use javascript in OBIEE. i.e steps to follow to insert the javascript in OBIEE 11g or 10g

    If you are trying to display total number of pages in a report, Add the below formula in the column of the report and hide that column in the report.
    FX = sum(count(1))/25
    You can then reference the column in the narrative view like this: "Total pages in the report are @5" and out put may be "Total Pages in the report are 30".
    Or
    You can also use something like the below:
    To calculate them use fi:
    CEILING(CAST(RCOUNT("FactColumn In the Report (Sum All)") as DOUBLE)/ 25) for the page number
    CEILING(CAST(COUNT("FactColumn In the Report (Sum All)") as DOUBLE)/ 25) for the total pages
    Put the above formula in the column and reference it in the narrative view like I mentioned in the previous example.
    If you are report view is pivot, then please refer to this link: http://oraclebizint.wordpress.com/2008/01/17/oracle-bi-101332-pagination-in-pivot-tables/
    Hope this helps.
    Thanks,
    -Amith.

  • How to use JavaScript Zoom in on the layer

    How to use JavaScript Zoom in on the layer

    yeah, i talking about zooming in on a 3D object,do you have a solution

  • How to use "Find my iPhone" application ?

    How to use "Find my iPhone" application ?

    Find My Phone would have had to be activated/turned on before your phone was lost/stolen.. There is no way to do that now, thus no way to use such to locate your phone. Had you done so, you would login to iCloud.com from any computer & see if you could locate your phone.

  • EREC - How to use link generated by application group?

    How to use link generated by application group?

    Hello Vishal,
    You provide the link eg. in a list and candidates just have to click on that if they want to apply.
    Regards
    Nicole

  • Templates used in the Apex application - How can we (re)used them ?

    Hello,
    when using the application builder itself, there are some page templates which can be very useful for our specific applications made by APEX. For example, the page "Report edition" (to detail a region based on report) is a very nice functional template, for these reasons :
    1. implementing a tab navigation inside a region (region definition / report attributes / print attributes)
    2. implementing a master/detail view, with multiple details and the possibility to show or hide these regions thanks to the header and the buttons on it (Show all / col attributes ....)
    Is there an easy way to integrate these good practices in our pages (existing wizards ? others techniques ?)
    Thanks,
    VF.

    Frit,
    See if the following post by David Peake helps:
    http://dpeake.blogspot.com/2009/01/preserving-user-saved-interactive.html
    Regards,
    Naveed.

  • How to restore or backup Apex application from Command line ? URGENT

    We have Oracle apex 4.1 installed in Oracle 11g R2 database (windows 64-bit) 2008 R2
    For some reason our database dictionary objects are corrupted.
    We wanted to backup our Apex applications in some workspaces ASAP.
    We are not able to access apex from http://localhost:7777/pls/apex/htmldb_login
    We have an underlying database schema export (expdp).
    1) Is there a way to export or backup the apex application without logging into the apex URL ? if yes how ?
    2) Does Oracle has any of its own native tool to backup and restore from command line ?
    Thanks in advance

    My (MS Windows) experience, if I may; perhaps you'll find something useful.
    You'll find the README.TXT file in /apex/utilities directory. Read it.
    In order to use APEXExport, you need JDK version 1.5 or higher. Check your version by typing (and viewing the result):
    C:\>java –version
    java version "1.6.0_06"
    Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
    Java HotSpot(TM) Client VM (build 10.0-b22, mixed mode, sharing)Its directory should be part of the PATH environment variable: on my computer, directory name isC:\Program Files\Java\jre1.6.0_06\binFurthermore, Oracle JDBC class libraries must be part of the CLASSPATH environment variable. Check whether it exists (in Control Panel - System - Advanced - Environment Variables). For my 10gXE, it is here:C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jarI couldn't make it work; didn't know that ".\" directory must be entered into CLASSPATH as well (found that information in Arie Geller's book). Therefore, my final CLASSPATH version is:.\;C:\oraclexe\app\oracle\product\10.2.0\server\jdbc\lib\ojdbc14.jarOK, setup is done. Now, go to your /apex/utilities directory and, from the command prompt, run (mind the upper case!)java oracle.apex.APEXExportwhich will show a short help.
    I chose to export the whole workspace. In order to do that, I need the workspace ID (got it from Apex's SQL Workshop; that might be a problem as you can't get there, can you? I can't tell how to find that information apart from SQL Workshop, but I'm pretty sure someone, who is much more experienced than me, will know it). OK, here's how you find it:select v('WORKSPACE_ID') from dual;Finally, here's the final step - export:C:\apex\utilities>java oracle.apex.APEXExport -db localhost:1521:xe -user scott -password tiger -workspaceid 1038408092496568The result are fxxx.sql files (where "xxx" represents application number).
    I hope you'll manage to export your applications; basically, nothing special here (except that ".\" directory in the CLASSPATH variable).
    Best of luck!

  • How to use javascript code in a plugin ?

    Hi,
    I'd like to use javascript in my plugin but after reading the JS API reference, i still don't understand where the code should be placed, and to call it from my plugin.
    I'm quite new in Acrobat SDK and developping applications in Acrobat using Javascript, so I hope it's not a dumb question...

    >is there a way i can call javascript without security checking?
    It wouldn't be security if you could just bypass it. Did you read all
    the security notes? You might be able to do something with trusted
    functions, but I'm not sure how that would integrate with a plug-in.
    Aandi Inston

  • How to use JavaScript in Dynamic commandLink

    Hi All,
    In my JSF application, I am able to get the dynamic CommandLink with the below mentioned code.
    commandLink.setActionExpression(createActionExpression("#{myBean.myMethod}", String.class));
    The above code is navigating to the page mypage.jsp properly (the page which is returned by method myMethod).
    My Question is: Instead of navigation (as mentioned above) I want to generate a popup window using JavaScript on click of commandLink.
    Please suggest me on how to proceed on this?

    Hers is my JavaScript:
    function showPopupWindow(action) {
    formId=action.form.id;
    //features="height=300,width=250,status=yes,toolbar=no,menubar=no,location=no,scrollbars=yes";
    features="toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,width=900,height=500,top=80,left=80";
    winId=window.open('Mypage.faces','list',features); // open search window
    winId.focus();
    This works perfectly with the onclick attribute of the commandbutton as shown below:
    <h:commandButton value="Open Popup" onclick="showPopupWindow(this); return false;"></h:commandButton>
    {color:#ff0000}
    But I tried same thing with the onclick attribute of the commandLink, that did not work.
    <h:commandLink value="Open Popup" onclick="showPopupWindow(this); return false;"></h:commandLink>
    {color:#0000ff}As per my requirement, I tried using setOnclick attribute in the following manner, that failed to open the popup:
    commandLink.setOnclick("{color}{color}*{color:#0000ff}showPopupWindow(this); return false;{color}*{color:#ff0000}*{color:#0000ff}");{color}*
    {color}

Maybe you are looking for