Development of the element using Javascript

Hello experts!

I have a problem with the setting of a value of element using javascript.

I have a button on my page which should regulate my point P1_SORT to the value 'test '.

I call the function with the following statement in the section my button URL:
javascript:f_setItem('P1_SORT');
The problem is that the item is not defined when you call the function.
Maybe you can help me understand why the service is defective and how it should be like.

The code I have (in my head of page) is as follows:
<script language="JavaScript" type="text/javascript">
function f_setItem (P1_SORT)
{ 
get.add(P1_SORT,('test').value)
gReturn = get.get();
get = null; 
;
}
</script>
Thanks for your help!

Sebastian

'test' is a string? or the element name?

Try this:

 function f_setItem (P1_SQRT)
{
var pValue='test';
$x(P1_SQRT).value = pValue;
}

or

 function f_setItem (P1_SQRT)
{
var pValue='test';
$x('P1_SQRT').value = pValue;
}

but of course it is jquery

Edit: second work because the element name is P1_SQRT -, as a variable in the function definition. If U accept jquery U should combinate with this example and I think it should work fine

Edit2: Var initialized U get?

Tags: Database

Similar Questions

  • Problem updated to a position of the element using javascript style.top estate version 4.6

    I develop a scrolling of content when the user clicks on an item, the program triggers the event and moves the content, it works perfectly in a device with the 5.0 version of the software, but in devices with software version 4.6 doesn't work

    No trigger that any error just doesn't work

    Here's him sew:

    var pag1 is document.getElementById ('page1');.

    function that removes "px" for the calculation

    function quitapx (str) {}
    return str.replace('px',"")
    }

    function that moves the item (pag1) upwards or downwards

    mueve function (o) {}
    var dir = o.dir;
    posT = Number (quitapx (pag1.style.top))
    If (dir =-1) {}
    If (posT<>
                    PAG1.style.top = posT + 64 + 'px ';
    }
    }
    If (dir = 1) {}
    If (posT > program) {}
                   PAG1.style.top = posT - 64 + 'px '.
    }
    }
    } //mueve1

    clues?

    I already found the problem.

    The first time that the user clicks to move the content, the pag1.style.top property is set to null, in the browser with version 5.0 software ignores and starts running, but in the browser with version 4.6 software detect zero and stop the script.

    the solution I use is

    If (pag1.style.top! == null) {}
    posT = Number (quitapx (pag1.style.top));
    } else {}
    posT = 0;
    }

    And work! Here is a picture.

  • Access to the value of the application using javascript

    How can we access the value of the APPLICATION using javascript? I tried $x ('REQUEST'), but it does not work.

    Thank you

    Hello

    If you use & ASK. (including the & and the.) in your javascript directly it will be replaced by Apex with the value of the actual demand

    Andy

  • Functions the discoverer of the elements using the full name?

    Hello everyone,

    I had a problem today using the discoverer administrator, while creating an element using a Trim function on the element used in the condition of the reports, when I check the SQL code, it uses the fully qualified name that is SYS. STANDARD. Trim (Item) instead of just the TRIM (ITEM) which makes a huge difference in the duration of the query.

    For example:

    Items in the folder:
    CHECK_CODE1, CHECK_CODE2, CHECK_CODE3

    New item you want:
    ALLCHECKCODES = TRIM (CHECK_CODE1) | » _'|| TRIM (CHECK_CODE2) | » _'|| TRIM (CHECK_CODE3)

    Condition:
    ALLCHECKCODES LIKE '% 1234% '

    This is the Sql that is generated:

    Select...
    Of
    < table_name >
    where
    SYS. STANDARD. TRIM (CHECK_CODE1) | » _'|| SYS. STANDARD. TRIM (CHECK_CODE2) | » _'|| SYS. STANDARD. TRIM (CHECK_CODE3) LIKE '% 1234% ';

    With the creation of element when I create a condition using the Trim function it is displayed correctly:

    ... where
    TRIM (CHECK_CODE1) | » _'|| TRIM (CHECK_CODE2) | » _'|| TRIM (CHECK_CODE3) LIKE '% 1234% ';

    Is it possible that we delimit the Discoverer administrator to build the regular element using Trim instead of the fully qualified name for the function?

    Enjoy your entries and your advice.

    Thank you.

    Vlaminck

    Hello

    The problem is that the TRIM does not use the syntax of the standard setting and therefore normally does not appear in the EUL. If the PAD has been imported into the EUL then you might find the TRIM function in Disco administrator under Save the PL/SQL functions and then remove the SYS and the STANDARD of the owner and package.

    Otherwise, I should just use LTRIM (RTRIM (.)) like LTRIM and RTRIM use the normal parameter syntax.

    Rod West

  • Show or hide the buttons of the model using JavaScript

    Can someone tell me to know to disable, show and hide the buttons of the model using JavaScript? In my case, I use AJAX for validation and the validation failed, I want to deprive the person's ability to submit the form. I did successfully using the HTML buttons but they seem ugly and do not correspond to the theme of the application. I really want to do using the model based buttons. Anyone know the answer to that?

    You can find that here:

    http://Apex.Oracle.com/pls/OTN/f?p=31517:143

    The only problem you have to solve is to assign an id to each template button. Rather than use an id string coded hard = "buttonHide1" as in my example, you could use id = "" #LABEL # "If there are a lot of different buttons you need to display / hide on a single page." However, at the same time make sure that the processes are also conditional and follow the logic. To hide a button, this isn't a guarantee that a process can not be executed.

    Denes Kubicek
    -------------------------------------------------------------------
    http://deneskubicek.blogspot.com/
    http://www.Opal-consulting.de/training
    http://Apex.Oracle.com/pls/OTN/f?p=31517:1
    -------------------------------------------------------------------

  • How to get the value of the global element using javascript or ajax!

    Hello!

    How can I read at global(point application created in the shared components) using ajax or javascript?
    You can imagine that I need to get the value of this element by function as:
    -----
    Function getText() {var itemVal = $x ('MY_GLOBAL_ITEM') .value;}  Return itemVal; }
    -----
    .. .but I can't do it because it is not made to couse of the page it is global element! so, anyone know no work around to do?
    I know that I can make point page and read the value of that, but not what I really need!
    If I have 100 pages and all pages need to use my function, it would take 100 Articles :) - that's why its no good average!

    Please, share your ideas!

    THX

    Rafix,

    You must use a little AJAX to retrieve a request element value. Three steps in this solution. Implementation of a callable JavaScript function, creating an application process on the request and call the JavaScript function with dynamic action.

    1 set up a JavaScript function that can be called by:

    This function calls the process of application level which has a visibility of the element of your application and then returns the value of points.

    Edit your page and JavaScript code according to the code in the 'function and Variable global statement' of your page. You can also add to the model page, that you use, but you also have to encapsulate this code in the script tags.

    getAppItem = function(pItemName){
        var get = new htmldb_Get(null,$v('pFlowId'),'APPLICATION_PROCESS=GET_APP_ITEM',$v('pStepId'));
        get.addParam('x01',pItemName);
        gReturn = get.get();
        get = null;
        return gReturn;
    }
    

    2. creating an application on request process:

    The application of level process has visibility to your application-level element. It is to retrieve the value of points and it prints the htp buffer. Essentially, this acts as a way to return the values of AJAX calls (the javascript function we set previously);

    go to the shared components > procedures > Create.

    Point process: "We Demand: run this application...". »
    Name: GET_APP_ITEM
    Type: Anonymous PL/SQL block

    declare
       -- get the item name passed into the JavaScript function.
       app_item_name varchar2(30) := apex_application.g_x01;
    begin
        -- print its value to the buffer
        htp.p(v(app_item_name));
    end;
    

    3. call the JavaScript function with dynamic action:

    The function call allows to specify an application-level element name and have its returned value. The trigger event is specific to what you need, but the action must be of type to run JavaScript code. In my case immediately the value of P1_NUMBER to my value of demand points. This code doesn't have to be in a dynamic action, but it helps to stay organized. you could call it from any script tag.

    $s('P1_NUMBER',getAppItem('MY_APP_ITEM'));
    

    See you soon,.
    Janet Tyson

  • How to hide the textfield element using javascript

    I point textfield and I want to hide it using javascript...

    can you help me please?

    Hello

    I checked his works well for me.

    Go to DISPLAY ATTRIBUTES and change the direction of cursor to DO NOT FOCUS CURSOR

    then check...

    Let me know incase of any concerns.

    See you soon,.
    Shan...

  • Rename the bookmarks using JavaScript?

    Hi all

    I searched the internet and Adobe forums and I can't find an answer to this. Is it possible to rename a bookmark using JavaScript? I want to run a batch renaming on my favorites to change or replace employees of employee names. For example:

    12345678 > John Doe

    I have to do this on a large amount of files that contain a large number of employee numbers and that's why I'm looking for a JavaScript solution. Thank you for all your help.

    There are different ways you can read an external file. It can be done using an object DataObject or even util.readFileIntoStream (), if the file is not too long.

    Once the contents of the file as a string you will need to process this string, divided by lines and then divide each line to get the data you need in a usable format.

    Then, you would need browse Favorites, by comparing each element in it the values in the list of the text file and rename it if it is a match.

    If the Favorites tree is not flat (that is to say, it has bookmarks under) you must use a recursive method to traverse it.

    This isn't a simple project for a beginner...

  • hide the element without javascript

    I have the form for an article that has its default value.

    I try hide the element in a state average and ordinary wirh too... but after action insert it doen't register any value

    I don't want to use javascript to hide. so...

    is it possible to hide point without javascript, so it will not lose its value after insert action?

    For the selected condition type, you must specify a "point-name" in Expression1

    CITY

  • Anyway do a MODAL popup window in the APEX, using JavaScript

    Y at - it anyway to make a MODAL popup window in APEX, using JavaScript.

    What I do is, at various stages in an application, I'm coding, the system will display a pop-up window, prompting users to enter their credentials. These credentials are then verified via LDAP.

    Basically I don't want the user to be able to close the window without entering their password or by clicking on the Cancel button.


    Here is the code I use:

    onClick = "javascript:esign();" "(Adding the HTML Form element attributes)


    function esign() {}
    popUp2 ('f? p = & APP_ID.:8: & SESSION.: & DEBUG.:', 450, 200);
    }



    I did a quick search on google and I met some JavaScript libraries that could do what I'm after is to say prototype.js, jquery.js
    but I was wondering if there is a default library that comes standard with APEX.

    Any help gratefully received

    Thanks, Keith

    create a button calling url and url target as the value
    JavaScript:modalWin();

    Place this script in the header

    You can create a button in a modal window to close
    and use this code for the text label of the button

    Closet

  • Is there an equivalent in Firefox for the element.style ['javaScript css_to_change']?

    I'm doing a site compatible for Firefox, but the element.style ['CSS_to_change'] doesn't seem to work (example: document.getElementById('element_ID').style [' - moz - transform "] ="rotate (90deg)"; must turn the item whose id is 'element_ID' at 90 degrees). It works in Google Chrome and I wonder if there is anything equivalent with it in Firefox...
    I'm sorry if I ask this question in the wrong place and I thank you in advance! Please let me know when you have an answer.

    Try this:

    document.getElementById('element_ID').style.setProperty('-moz-transform','rotate(90deg)','');
    javascript:void( document.getElementById('question').getElementsByTagName('IMG')[0].style.setProperty('-moz-transform','rotate(180deg)',''));
    
  • How to create the custom using Javascripts in PLM for Agile process validator

    I have already created customized using ASP.Net validators. But now I need to create custom using Javascript validator.

    Please provide me the details

    1. how to create custom validator and where to create?

    2 provide me with code samples for custom validators javascripts

    Thank you

    Floquet

    I am currently using 6.1.1.5

  • How to change the color using JavaScript

    How you specify the color of a shape by using JavaScript to animate?  The code below does not work.  I'm not find documentation on how to work with JavaScript in Animate out snippets of code in box provided.

    this.redBox.style.color = "#00FF00";

    this.redBox.style.color = "rgb (155, 102, 102);

    The API chart in canvas mode is CreateJS. CreateJS is very well documented.

    EaselJS v0.8.2 API Documentation: Graphics

  • copy of XSLT creates a xml that returns empty while trying to access the elements using XPATH

    Hello

    I'm doing a copy - of the function by using the XSLT in jdev. That's what I do

    < xsl: param name = "appdataDO" / >

    < xsl: template match = "/" >

    < ns1:applicationData >

    < ns1:applicationId >

    < xsl: value-of select = "$appdataDO / ns1:applicationData / ns1:applicationId" / >

    < / ns1:applicationId >

    < xsl: copy-of select = "/ fslo:ExternalapplicationData / fslo:ApplicationsHDRAddInfo" >

    < / xsl: Copy - of >

    < / ns1:applicationData >

    < / xsl: template >

    < / xsl: stylesheet >

    After that, I can see the document created in the flow of process like this:

    < ns1:applicationData >

    < ns1:applicationId > MMMM < / ns1:applicationId >

    < ns2:ApplicationsHDRAddInfo >

    < ns3:genericFromBasePrimitive > iuoui < / ns3:genericFromBasePrimitive >

    < ns4:EstimatedMarketValue > 77 < / ns4:EstimatedMarketValue >

    Jih < ns4:PropertyInsuranceFee > < / ns4:PropertyInsuranceFee >

    hjh < ns4:LoanOriginationFee > < / ns4:LoanOriginationFee >

    KKKKK < ns4:RegistrarFee > < / ns4:RegistrarFee >

    hjh < ns4:LoanCashInFee > < / ns4:LoanCashInFee >

    < ns4:LoanPaidInCashFlag > cddffgd < / ns4:LoanPaidInCashFlag >

    < / ns2:ApplicationsHDRAddInfo >

    < / ns1:applicationData >

    But whenever I am trying to extract all nodes output I get an empty result. I can copy the whole dataset in the same type of variable.

    But I am unable to get the individual elements using XPATH.

    I tried to use the exslt for all nodes and xslt 2.0 without success.

    Namespaces may be the culprit here. The test in the jdev method can produce a result, but during the execution, the xpath expression returns empty.

    I created another transformation where I try to copy the data from the DataObject precious a simple string in an another data object.

    This is the test sample source xml transformation created by jdev when testing with all the namespaces, where I try to copy the data into a simple string in an another data object.

    " < applicationData xmlns: xsi =" http://www.w3.org/2001/XMLSchema-instance "xsi: schemaLocation =" http://xmlns.Oracle.com/bpmpa/FS/ulo/types file:/C:/JDeveloper/NewAPP/Xfrm/xsd/ApplicationData.xsd "xmlns =" http://xmlns.Oracle.com/bpmpa/FS/ulo/types "> "

    applicationId289 < applicationId > < / applicationId >

    < ApplicationsHDRAddInfo >

    " < genericFromBasePrimitive xmlns =" http://xmlns.Oracle.com/BPM/PA/Extn/types/BasePrimitive "> genericFromBasePrimitive290 < / genericFromBasePrimitive > .

    " < EstimatedMarketValue xmlns =" http://xmlns.Oracle.com/BPM/PA/Extn/headerCategories/ "> 291 < / EstimatedMarketValue > .

    " < PropertyInsuranceFee xmlns =" http://xmlns.Oracle.com/BPM/PA/Extn/headerCategories/ "> PropertyInsuranceFee292 < / PropertyInsuranceFee > .

    " < LoanOriginationFee xmlns =" http://xmlns.Oracle.com/BPM/PA/Extn/headerCategories/ "> LoanOriginationFee293 < / LoanOriginationFee > .

    " < RegistrarFee xmlns =" http://xmlns.Oracle.com/BPM/PA/Extn/headerCategories/ "> RegistrarFee294 < / RegistrarFee > .

    " < LoanCashInFee xmlns =" http://xmlns.Oracle.com/BPM/PA/Extn/headerCategories/ "> LoanCashInFee295 < / LoanCashInFee > .

    " < LoanPaidInCashFlag xmlns =" http://xmlns.Oracle.com/BPM/PA/Extn/headerCategories/ "> LoanPaidInCashFlag296 < / LoanPaidInCashFlag > .

    < / ApplicationsHDRAddInfo >

    < / applicationData >

    And the xslt transformation

    < xsl: template match = "/" >

    < ns1:DefaultOutput >

    < ns1:attribute1 >

    < xsl: value-of select = "/ fslo:applicationData / fslo:ApplicationsHDRAddInfo / custom: LoanOriginationFee" / >

    < / ns1:attribute1 >

    < / ns1:DefaultOutput >

    < / xsl: template >

    The result is an empty attribute1. Any help will be appreciated.

    Please remove attributeFormDefault = "qualified" elementFormDefault = "qualified" in your XSD

    Please visit the following link:

    http://www.oraclefromguatemala.com.gt/?p=34

  • Test for the day of the week, using javascript?

    Is it possible to test for what day of the week has been selected in a Date field using javascript?

    I have a script that checks if an option button 'Day' is checked and if so throws an error if the input time is not between 06:00 and 15:30. I need to change the hours between 06:00 and 14:30, but only if the day of the week is a Friday (selected in the field 'Date').

    Any ideas would be really appreciated.

    If

    (TimeReceived.isNull == true()

    {

    xfa.host.messageBox ("Please enter a time received");

    TimeReceived.rawValue

    = null;

    xfa.host.setFocus ("TimeReceived");

    }

    else If ((TimeofCall.Day.rawValue ==0))

    {

              if (TimeReceived.rawValue.search(":") > 0)

                        val1 = TimeReceived.rawValue.replace (":", "");

    on the other

                        val1 = TimeReceived.rawValue;

              if (val1 < 600 || val1 > 1530)

    {

    xfa.host.messageBox ("If 'Airtime' has selected day, the"received time"must be included in the normal working hours (06:00 to 15:30).") Make sure that you use military time, please re-enter. ») ;

    TimeReceived.rawValue

    = null;

    xfa.host.setFocus ("TimeReceived");
    }
    }

    FormCalc has a date function to obtain the day of the week.

    Form1.Page1.Subform1.DayOfWeek::calculate - (FormCalc, client)

    date_ var = Date2Num(date.formattedValue,"MM/DD/YYYY")
    $ = Num2Date (date_, "EEE")

    The "EEE" model returns MON, Mar, sea, etcetera. You must synchronize the date pattern on the DateTimeField ('date' in my case) with the script.

    "dayOfTheWeek" could be a hidden field and you can reference the 'dayOfTheWeek.rawValue' of your JavaScript.

    Steve

Maybe you are looking for