Best approach to call a javascript function in a tabular presentation

Hi all

I have a manual tabular presentation. In this form, I have a javascript function that disables hiredate column. The function is called on the deptno column change.

So, if I select the "Research" Department and hire date field is disabled for the selected line.

I need to run this function also executed automatically on page load. So, it checks if all rows with deptno as search and disable hiredate field for these lines.

Please let know us the best approach to achieve this goal, which does not affect the performance that the page has 2000 lines.

function test2 (pThis) {}

var v_item_value = pThis.value;

var v_hiredate_item = $(pThis).closest('tr').find ('td [headers = HIREDATE] input [name = f05]');

var v_hiredate_button = $(pThis).closest('tr').find ('td [headers = HIREDATE] button "");

var currIndex = $('select[name="'+pThis.name+'"]').index (pThis);

var currRow = currIndex + 1;

If (v_item_value == '20') {}

v_hiredate_item.prop ('readOnly', true);

v_hiredate_button.prop ("disabled", true);

document.getElementById("f08_"+[currRow]).disabled = true;

}

else {}

v_hiredate_item.prop ('readOnly', false);

v_hiredate_button.prop ("disabled", false);

document.getElementById("f08_"+[currRow]).disabled = false;

}

}

Thank you

Zkay

Try this:

Suppose that the deptno column name is "f08".

execute a javascript script that triggers the loading of the page

$("[name=f08]').change ();

Tags: Database

Similar Questions

  • Error when you try to call the Javascript function in the ActiveX Web browser

    I have a requirement to call a Javascript function in a web page that is displayed in the browser's ActiveX control.  I have the control on the front panel, and I use the Navigate method to call to the top of the appropriate page.  Based on an example, I found, I'm trying to get a reference to the HTML Document so that I can then get a reference to the Fenetreparent.  There is a method of the HTML Window object called execScript who I'm calling.  See the attached image of the code (reference close calls do not appear, but when I run it, they are there).

    I can't the node property that returns the parentWindow reference.  The error I get is the following.

    Error-2147467262 LabVIEW: (Hex 0 x 80004002) No. taken such interface supported.

    Any ideas on where to go from here?

    Hello

    I have reproduced the issue and the error you are seen and tried to understand what is the solution.

    It seems that the problem is with getting the pointer to the parentWindow.  From what I read on MSDN, it's maybe a limitation in the use of an ActiveX control in LabVIEW. It seems like Internet Explorer creates the object of the window, and so opening in one ActiveX control you free access to this top-level object.

    Here could be workaround for javascript execution in your program:

    I would like to know if it works for you and if it will work in your program.

  • Flash cannot call the javascript function in the local html file

    Hello!

    Us is to develop our first application on Playbook. It is an html file including a flash file and javascript code. Everything is packed in. in the file bar, a config.xml file and has been correctly loaded into the Playbook. Everything works locally (no web access)

    Everything works well except when we use an ExternalInterface.call("saveglobalscore",score) in flash that calls a javascript function in the .html file.

    In the actionscript3, we selected the "authorized local file access" and put the 'Security.allowDomain("*) '.

    Any ideas? Thank you!

    External interface tries to access the files packaged locally is currently a known issue.  I have not really of a calendar when or if this can be resolved.  It may be in the code base of flash.

  • Call a Javascript function in a Captivate 7 Web page

    Hello

    I try to call a javascript function in a web page to Captivate 7. The call is an output of blade event. When I saw the (F4) project, I have a prompt that displays a javascript function is called and told me to display in a web page. Of course, which is perfectly logical. However, when I go to the same project in the hml with the necessary Javascript function in page, I get nothing. The script is a simple that displays an alert.

    I made sure the SWF in question is defined in the global security settings. I know that the javascript function is correctly formatted.

    Can someone please give me an example of how to "execute Javascript" call of Captivate to a function residing in the html page please.

    Any help is appreciated.

    Don't just add the SWF file to the Flash security locations overall of confidence.  Add the entire folder containing all the files published, or better still, a level that contains all your published Captivate projects so that you never have to worry about Flash security issues again.

    Also, if it still does not work, I would try the same running JavaScript with a different event than the event output slide.  It can be a little bit reliable.

  • Call a javascript function in the Value attribute of param

    Hello

    I want to put a TLF text field in the SWF file in an HTML page. So I used flashvar, by calling a javascript function to it attribute "value" as follows.

    < param name = FlashVars value = "" + SetFlashMovieParam() + "" id = "message" / > "

    SetFlashMovieParam() is a javascript like the following function.

    function SetFlashMovieParam() {}

    document.getElementById("message").setAttribute ("value", "msgText = Start");

    }

    Even if this does not work, when I put the text value directly to the 'value' attribute, it worked.

    < param name = FlashVars value = "msgText = here % 20is % 20The % 20text" id = "message" / > "

    I think it's because calling a javascript function syntax error in the param tag. Can anyone help to call this function properly...

    Thank you.

    Normally when you have an executable code embedded in the html code you should check that article accordingly.  In the case of javascript surround you with

  • How to call the javascript function in ADF

    I have the javascript function stored in a .js file external (try to reuse in another application). How can call the javascript function for an event of ADF faces component. I need to I am a newbie to ADF, all ideas are appreciated.

    Kind regards
    Surya

    Published by: sgodavar on Sep 24, 2010 11:44

    Include JavaScript to the jsff/jspx as page:

    Call it like:

    Type = "dblClick" / >
    Amit

  • Call the javascript function by hovering the mouse over the tab

    Hi all
    I have an application with a level tabs. I want to call a javascript function to the mouseover of the standard tab please help as soon as possible.

    Thanks in advance

    Hello

    Go to the page template and scroll the tab Standard attributes. In my current theme which has a line that looks like this...

    #TAB_LABEL##TAB_INLINE_EDIT#
    

    You could change this

    #TAB_LABEL##TAB_INLINE_EDIT#
    

    Or make reference to a function that you included in the header.

    Alternatively, you can make the same change to no current tab.

    Is that what you mean?

    See you soon

    Ben

    Published by: Munky on January 14, 2010 11:34

  • Need to call the javascript function when the page is loaded

    Hello - I have a javascript function defined on Page 0 of my application. It is in the source of an unconditional
    region whose view point is after the header.

    I call successfully the function of event onchange on individual page elements. (The function
    sets the value of an element based on the value of another).

    But I also need to call the function when the page is loaded. The page is a form of data modification,
    so many values is filled when it is loaded, and I need the dependent values populated
    also.

    I tried to add the call to function in the following way. It is not at all get called (alerts are not forthcoming)
    and there is no error in the Firefox error console...
    - as an event onload in individual items
    -call directly to the edit HTML page header
    -call directly from the HTML body of the edit page (which, from what I've read, sounds
    as to execute onload and my page template doesn't have a defined substitution onload string).

    In these 2 cases, I simply call it like: jsLookupValue ($v ("P8_OBJECTTYPE_ID"), "objecttype_id", "P8_OBJECTTYPE_NAME", "objecttype_name", "hdb_objecttype");

    How can I do this?

    Thank you
    Carol

    If you define the function on the zero page and any page you should be able to call using something like:

    
    

    Have you tried to put just a statement alert() on the page in order to check that it runs just about anything?

  • Use about Central button mouse to call the JavaScript function question

    I want to use the mouse middle button to call the function JavaScript (< a href = "javascript:help ()" >) help() opens a new window and directly to the Help Page of my GUI, but when I click on it with the middle button, it will open new tab blank Page that url = "javascript:help()"; " can't help executive function... What is a Firefox Bug or a correct behavior in Firefox? I thank.

    You must use left click to manage JavaScript links.

    See also http://kb.mozillazine.org/browser.link.open_newwindow.restriction

  • Call the javascript function using parameters cause run an immediate dependant

    Hello.

    I saw a strange behavior, if I try to use javascript parameters in the method af:clientListener property.

    Using the syntax
     <af:commandButton text="Init" id="cb1"
       partialSubmit="true">
       <af:clientListener method="OnInitControl1" type="click"/>
    </af:commandButton>
    and javascript
    function OnInitControl1() {
      alert('OnInitControl1 called');
    }
    the method oninitcontrol1 is called first with the click of the button.

    But with the syntax
    <af:commandButton text="Init" id="cb1"
       partialSubmit="true">
       <af:clientListener method="InitCtrl('Control1')" type="click"/>
    </af:commandButton>
    and javascript
    function InitCtrl(frameName) {
      alert('InitCtrl(' + frameName + ') called');
    }
    the InitCtrl function is called immediately to the loading of the page.

    In both cases, the javascript file is inserted into the use of af: document
    <af:resource type="javascript" source="/ScriptHelper.js"/>
    Is my "method" of the af property syntax: clientListener the problem?

    Paul.

    Paul,

    I don't know if you can call javascript with parameters in the way that you are currently using. However, have you tried using an af:clientAttribute and enhance the javascript?

    Check the operating instructions by Frank on the related topic.

    http://www.Oracle.com/technology/products/jdev/tips/fnimphius/passingAdditionalArgumentsToClientListener.html

    Arun-

  • In cascade LOV and calling a javascript function thro dynamic action

    We have a page where there are lovs cascaded to the country / state. The selection of State list is cascaded with country LOV. We also request a javascript to normalize the child lov (State), so that if there is no value in the list, the lov will be disabled and if there is only one value for show, which will be set as default (enabled). However, it seems apex runs javascript code standardize everything first and then generates the list for the lov State, then the State lov is always disabled.

    I created a page similar to apex.oracle.com with choice of Department lists and employee. The link to the page is http://apex.oracle.com/pls/apex/f?p=40631:2

    In this page, the employee selection list is cascaded to the Department. (1) to any value other then 'IT' or no selection value in the list of DEPARTMENTS, the list of employees must be enabled and should list all the names of appropriate employees. (2) for the selection of the 'IT', it should be disabled with the default selection as "no data found". However it does not for 1). Could someone find the problem and give a possible solution.

    Javascript code executed (that thro NatStandardizeLOV1('P2_EMPLOYEE') dynamic action for Department change is lower.

    < code >
    function NatStandardizeLOV1 (pitem)
    {
    var obj = document.getElementById (pitem);
    obj. Disabled = false;
    obj.options [0]. Text = "SΘlectionner one..";


    If (obj.type is "select one")
    {

    If (obj.length == 1 & & (obj.options [0] .value == ": obj.options [0] .value == null))
    {
    obj.options [0]. Text = "No. Data."
    obj.disabled = true;
    }
    If (obj.length == 2 & & (obj.options [0] .value == ": obj.options [0] .value == null))
    obj.options [1]. Selected = true;
    }
    }


    < code >

    Thank you in advance,

    Natarajan

    Published by: Nikita on May 27, 2011 04:21

    Natarajan,

    The question is one of the time. You're service is running before the Ajax request (triggered by the LOV cascading) brings back the items. So change the 'when' of dynamic Action so that it fires the event "After Refresh" of the question of the Department rather than the event change.

    Kind regards
    Dan

    blog: http://danielmcghan.us/
    work: http://SkillBuilders.com/APEX/

  • Good way to call the JavaScript function

    I am launching a popup to size using the Captivate 1 javascript capabililties.

    My function is defined as follows:

    function popup1() {}
    var functions = 'directories = no, menubar = no, status = no, titlebar = no, toolbar = no, width = 742, height is 563';
    var mypopup = window.load event ("Fund sovereigns/dmatmp.html ', 'mypopup' features ').
    }

    Essentially, when the user clicks on the box, this function will strip the chrome, resize the popup window and load the page dmatmp.html. Pretty simple.

    In the javascript box, under run Javascript, I have the following question:

    onclick = "popup1 ()" "

    However, when I click on the link in Captivate, Internet Explorer opens a window then closes immediately. Firefox opens a tab and fill it with nothing.

    What is the problem?

    Matt

    jbradley88, your suggestion has ALMOST been the solution... I made your corrections and still had the problem.

    The code that I put in the "execute Javascript part ' of the clickbox was:

    JavaScript:popup1()

    No one who has documented anywhere, of course... nowhere I could find anyway.

    Anyway, problem solved.

  • ADF: Can I call java method clsss javascript function in the ADF?

    Hello

    I want to call the javascript function in the Java class method, it is possible in the ADF? If Yes, how?

    or I need to use Java 6 function directely?

    Kind regards
    Deepak
    private void writeJavaScriptToClient(String script)
    {
    FacesContext fctx = FacesContext.getCurrentInstance();
    ExtendedRenderKitService erks = Service.getRenderKitService(fctx, ExtendedRenderKitService.class);
    erks.addScript(fctx, script);
    }
    

    its use

    StringBuilder script = new StringBuilder();
    script.append( "var popup = AdfPage.PAGE.findComponentByAbsoluteId('p1');");
    script.append("if(popup != null){"); script.append("popup.show();"); script.append("}");
    writeJavaScriptToClient(script.toString());
    

    Timo

  • Can run us javascript function locally within the amx page?

    Hello

    I am totally new to the features of the MAF, let me just 1 thing right, im familiar with the implementation of javascript as on PHP. For example, (1) you can create a js file in a certain directory of your project as long as you can connect properly. And, on the php page, you link such as)<script type="text/javascript" src="file.js"></script>)to be of use inside of your php page or (2)locally run the javascript function inside your php page such as

    function myFunction(){
      
    Alert("Hello World.");
    }.


    So far what I've done on the tutorial javascript MAF, same case, you need to specify your javascript function inside a .js file and save your js file in your maf function (so that the javascript functions are available and can be called through the java method of AdfmfContainerUtilities.invokeContainerJavaScriptFunction () inside your file of java bean managed). After that, in my case to test the tutorial, I need to create a managed bean method to call the associated javascript function based on my actionlistener to the button that ive created inside my amx page, it didn't work (NOTHING HAPPENED when the button is clicked, as maybe it's because I was wrong by calling the managed bean method or class({viewScope.popupHelperBean.onPopupShowHideAction}). )


    Please follow this tutorial to understand what im referring to topic-> https://blogs.oracle.com/mobile/entry/how_to_open_and_close

    (If someone has already managed to made this javascript tutorial, please inform me so that I can see on my error).


    Now I'm trying a different approach which is to run the javascript locally, it's just that I don't have enough resources that could satisfy my investigation to start with. I met this amx: verbatim terms during my research. Fact amx: verbatim help by running the JavaScript locally.


    Thanks in advance.




    Hello Amey,

    Thanks, I had run successfully the popup alert box based on javascript this tutorial you had linked to me, it seems that I am on the right track on how to run javascript on the page of the amx. Its just that the tutorial I mentioned on my post doesn't seem to work as it should, I'll try to resolve the issues for a while. I just want to share with the community who are new to the MAF and are currently working on the custom javascript on page amx application:

    1. include your js inside your working directory file

    2. Add the javascript code that is personalized to your AMX

    3. create a managedbean and a method that could call the javascript function

    Carefully follow this tutorial as mentioned by Amey have the idea of how the javascript is running on amxpage--> https://blogs.oracle.com/mobile/entry/invoking_custom_javascript_from_an

    By the way, thank you very much Amey.

    Learner90

  • Call from JavaScript to AS3 bar reading

    Platform: Captivate 7

    Source: AS3 (obvious, I hope!)

    Output: Flash v10

    I make a unique version of one of the default player bars.  I'm doing the Exit button call a JavaScript function using the following code:

    var btnTipsId = 8;

    function onClicked()

    {

    to import flash.external.ExternalInterface; //Register ExternalInterface

    ExternalInterface.call("saveglobalscore",score) ("closeModule ()"); //Call JS to close Div

    / / parent.onPBCBtnClick ("exit");

    }

    As you can probably see, I don't want to Exit button to close the module with the way she normally does.  My 'closeModule()' function removes a Div layer that hosts the Captivate.  I know it works as we use it in other places.  The problem I encounter is strictly in obtaining the PlayBar to call this JavaScript instead of its function by default 'parent.onPBCBtnClick ("exit");".

    Any ideas?

    Try calling closeModule without the parentheses:

    ExternalInterface.call("saveglobalscore",score) ("closeModule");

Maybe you are looking for