Need to compare html text area values by using java script

I have one html text area in my JSP file. when i click on that text area, a pop-up will come, in that pop-up i have list of items. So after selecting a item from that pop-up list, need to click okay. so that text area will update with the selected value.
In this case, i need to compare the first text area value and updated text area value. How can i do that in Java Script.

I suggest you look for a Javascript forum to ask questions about Javascript. This is a Java forum.

Similar Messages

  • Unable to read values populated using Java Script

    hi Experts,
    we generated a BSP Page through some SPRO setting it contains HTML and ABAP scripts.
    in that we have 2 select - option - dropdowns. i first one is being populated by ABAP script. second one is being populated by java script.
    the BSP page is working fine. but i am unable to read the second dropdown value using a class method
    we call this class method in the BADI : CRM_SERVICE_WEBREQ. method : FORM_ON_EVENT
      CALL METHOD cl_uxs_xml_services=>get_value_via_xpath
      EXPORTING
        ir_node                   = ir_form_data
        id_xpath                  = 'secondChoice'
         id_xpath_namespace_uri    =
         id_xpath_namespace_prefix =
         id_multi_namespace        =
      RECEIVING
        rd_value                  = lv_value
      EXCEPTIONS
        not_found                 = 1
        not_unique                = 2
        OTHERS                    = 3
    but i am able to read other fields in the page. i am not sure but i changed the id and name on the second drop down.
    pls let me know how to read the value for second drop down.

    Hi Ben Grice,
    ASP.NET questions should be post in
    ASP.NET forums. You can get better help there.
    Thanks for your understanding.
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Error in Dynamic Value Change Using Java script

    Hi ,
    I am trying to put dynamic value sin tabular form report.
    I used the below code
    function updateLOV3(filter, listName,itemId,po_no){
    var xml = null;
    var list = document.getElementById(listName);
      var get = new htmldb_Get(null,$v('pFlowId'), 'APPLICATION_PROCESS=Update_Invoice_UOM',0);
    alert(po_no);
    alert(itemId);
    get.add('TEMPORARY_ITEM', po_no);
    get.add('TEMP_ITEM', itemId);
    alert(list);
    ret = get.get('XML');
    if(ret){
      var s = ret.getElementsByTagName("select");
      if(s){
       var o = ret.getElementsByTagName("option");
       oCount = o.length;
       if(oCount!='0'){
            var l_Opt_Xml = o[0];
            appendToSelect(list, l_Opt_Xml.firstChild.nodeValue);
    if(oCount=='0'){
    alert('entering');
       list.value=0;
    get = null;
    function appendToSelect(pSelect,pContent) {
    alert(pContent);
    pSelect.value=pContent;
    }my Application Process code is
    declare
    begin
    owa_util.mime_header('text/xml', FALSE );
    htp.p('Cache-Control: no-cache');
    htp.p('Pragma: no-cache');
    owa_util.http_header_close;
    htp.prn('<data>');
    htp.prn('<select>');
    for rec in (SELECT UNIT_OF_MEASURE r ,UNIT_OF_MEASURE d FROM HOMES_RGP_PURCHASE_ORDER_LINES WHERE ITEM_ID = :TEMP_ITEM AND
    PURCHASE_ORDER_ID = :TEMPORARY_ITEM)
    loop
    htp.prn('<option value="' || rec.d || '">' || rec.r || '</option>');
    end loop;
    htp.prn('</select>');
    htp.prn('</data>');
    end;In my application process if i removed the PURCHASE_ORDER_ID = :TEMPORARY_ITEM then the value is coming.
    Java Script giving both values like item id and purchase order id.
    If i ran the sql query manually its giving values.
    i hope thers is some error in get.add method in java script.
    Its always going into the below condition
    if(oCount=='0'){
    alert('entering');
       list.value=0;
    get = null;but manually i have checked the database the value is present.
    Please anyone help me out in this.
    Regards,
    Shan...

    Hi all,
    The same i have checked with emp table but still i got the same problem.
    Its my application process
    declare
    begin
    owa_util.mime_header('text/xml', FALSE );
    htp.p('Cache-Control: no-cache');
    htp.p('Pragma: no-cache');
    owa_util.http_header_close;
    htp.prn('<data>');
    htp.prn('<select>');
    for rec in (SELECT ename r,ename d FROM 
    emp
    WHERE  empno = :TEMP_ITEM)
    loop
    htp.prn('<option value="' || rec.d || '">' || rec.r || '</option>');
    end loop;
    htp.prn('</select>');
    htp.prn('</data>');
    end;My Javascript code is
    <script type="text/javascript">
    function setvalues(itemId,list)
    var s = $v(itemId);
    alert(s);
    var get = new htmldb_Get(null,$v('pFlowId'), 'APPLICATION_PROCESS=POPULATE_EMPNAME',0);
    get.add('TEMP_ITEM', s);
    ret = get.get('XML');
    if(ret){
      var s = ret.getElementsByTagName("select");
      if(s){
       var o = ret.getElementsByTagName("option");
       oCount = o.length;
       if(oCount!='0'){
            var l_Opt_Xml = o[0];
            appendToSelect(list, l_Opt_Xml.firstChild.nodeValue);
    if(oCount=='0'){
       list.value=0;
    get = null;
    function appendToSelect(pSelect,pContent) {
    pSelect.value=pContent;
    </script>Can anyone suggest me what i have missed???
    Cheers,
    Shan

  • Compare two text box values????

    Hello All,
    I do have one logic, but not sure where to write it so want your guys help for the same.
    The logic is:-
    if (&P13_NEW_PASSWORD. == &P13_CONFIRM_NEW_PASSWORD.) then
    insert into tbuser (password) values (&P13_NEW_PASSWORD.);
    else
    dbms_output.line_('Both the text boxes should be same!!')
    P13_NEW_PASSWORD and P13_CONFIRM_NEW_PASSWORD are two text boxes, where in above statment I'm comparing two text box values, if yes than insert that values into the DB tables otherwise displaying else messges.
    so can anybody tell me where should i write the above logic to make it work perfect..!!!
    thanks
    regards,
    Kumar

    Kumar,
    I'm glad you asked! Here's a great blog post on a custom auth scheme that hashes passwords:
    http://djmein.blogspot.com/2007/07/custom-authentication-authorisation.html
    I would suggest a few changes to the "get_hash" function. First, the DBMS_OBFUSCATION_TOOLKIT has been deprecated in favor of DBMS_CRYPTO:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14258/d_crypto.htm
    http://www.psoug.org/reference/dbms_crypto.html
    DBMS_CRYPTO offers Message Authentication Code (MAC) functions which are keyed hashes. If you use a non-keyed function such as MD5 (which is VERY well known), someone can easily generate a table of all possible passwords within reason and their matching hash, which essentially allows them to get the passwords. MAC functions take in the data (password in this case) and a key. You can probably just use a big random string for your key. Now someone would need to the key as well to generate a hash table. In short, just use DBMS_CRYPTO.MAC where Duncan used DBMS_OBFUSCATION_TOOLKIT.md5.
    Tyler

  • How to pass values to variables in WAD 7.0 using java script

    Hi.,
    My requirement is based on WAD 7.0.
    The sales value has to displayed in WAD using graph with various chart types.
    I have created variables for plant and material group in a query.
    I have created drop down box for plant with all plants in it, check box for material group and a Submit button in WAD in FORM tag of HTML coding.
    Once all the values are set in drop down box, checkbox and if the user clicks on submit button, the values has to captured by the variables for which I have created and the graph has to be aligned to the new values in variables.
    Kindly help me how to use java script to get the values from FORM and pass it to variables.
    Regards,
    Selva

    Hi Selva,
    You do not need to use Javascript for this. Instead you can achieve this by using API Commands in WAD 7.0.
    Please configure Action on the ButtonGroup webitem to use 'Commands'.
    ->Choose Command 'Set Variables Values / SET_VARIABLES_STATE' under Commands for Web Templates
    ->Set Display Variable Screen setting to OFF
    ->Choose Query Variable for Plant, Select Variable Type as 'Binding Type', Binding Type as 'Data Provider Selection', Data Provider as the one you have assigned to the Dropdown webitem, Characteristic as 0PLANT or as that assigned to the Dropdown webitem
    ->Repeat above steps for Query Variable Material Group
    Now when you make a selection from the Dropdown webitems, the Chart output will change accordingly. Let me know if this helps.
    --Priya

  • How can I get selected EXCEL area using java script office API (v 1.0)

    Hello everyone,
    I need to get values of specified area in an excel sheet using java Script Office API. For an example,
    A1:A7 row load into array using JS. 

    And you posted to a C++ forum, not a JavaScript or Excel forum.... why? 
    Visual C++ MVP

  • Do I need to pay anything to Adobe if I inject java script using some open source library?

    Hello,
    I want to restrict PDF reader to achieve Digital Rights Management (DRM).
    Do I need to pay anything to Adobe if I inject java script to achieve so using some open source library?
    Basically I want my PDF documents to be restricted such that I can: 
    Limit printing
    Prevent screenshots
    Restrict access by license expiry date
    Restrict distribution of downloaded PDF (i.e. the document should run on specific machine only)
    Restrict copy and paste within PDF document
    I came across below links from which I suspect Adobe expects one to pay if he/she attempts to restrict reader functionality in some way?
    http://www.adobe.com/devnet/reader/topic_drm.html
    http://www.adobe.com/devnet/acrobat/overview.html
    Am I correct in my assumption?

    I think it is a vain hope to imagine you could implement DRM via JavaScript. Remember it can be turned off.
    Printing is either enabled or disabled according to document security.
    Working with PDFs does not require permission from Adobe but
    * adding functionality to Adobe Reader definitely does; a DRM development license is a major investment.
    * if the file is Reader-enabled, all third party tools will disable that.

  • Read Text file using Java Script

    Hi,
    I am trying to read a text file using Java Script within the webroot of MII as .HTML file. I have provided the path as below but where I am not able to open the file. Any clue to provide the relative path or any changes required on the below path ?
    var FileOpener = new ActiveXObject("Scripting.FileSystemObject");
    var FilePointer = FileOpener.OpenTextFile("E:\\usr\\sap\\MID\\J00\\j2ee\\cluster\\apps\\sap.com\\xapps~xmii~ear\\servlet_jsp\\XMII\\root\\CM\\OCTAL\\TestTV\\Test.txt", 1, true);
    FileContents = FilePointer.ReadAll(); // we can use FilePointer.ReadAll() to read all the lines
    The Error Log shows as :
    Path not found
    Regards,
    Mohamed

    Hi Mohamed,
    I tried above code after importing JQuery Library through script Tag. It worked for me . Pls check.
    Note : You can place Jquery1.xx.xx.js file in the same folder where you saved this IRPT/HTML file.
    <HTML>
    <HEAD>
        <TITLE>Your Title Here</TITLE>
        <SCRIPT type="text/javascript" src="jquery-1.9.1.js"></SCRIPT>
        <script language="javascript">
    function Read()
    $.get( "http://ldcimfb.wdf.sap.corp:50100/XMII/CM/Regression_15.0/CrossTab.txt", function( data ) {
      $(".result").html(data);
      alert(data);
    // The file content is available in this variable "data"
    </script>
    </HEAD>
    <BODY onLoad="Read()">
    </BODY>
    </HTML>

  • How to use java script when popups are blocked in browser

    How to use java script when popups are blocked in browser

    Not. When people install a popup blocker they don't WANT popups, so stop trying to force them down their throats.

  • Need to Remove html text in Saved PDF from OBIEE Dashboard

    Hi,
    It's OBIEE 10g related issue...
    Customer wants a Dashboard as PDF, Dashboard has a footer which has a HTML link. While saving this Dashboard into PDF file, it has the HTML text in footer place rather than HTML link.
    Can you please help me on this issue that how to resolve this.
    Thanks in advance...

    Hi,
    This is a known bug in OBIEE. Refer to :
    BUG:7369585 - SUPPORT OF HTML TAGS IN PRINT TO PDF (NARRATIVE VIEW, DASHBOARD TEXT OBJECT)
    BUG:7476622 - HTML TO PDF NARRATIVE AND OTHER FORMATTING DIFFERS
    BUG:8787191 - NARRATIVE DOES NOT DISPLAY CORRECT FONT SIZE AND CENTER IN PDF
    BUG:9372634 - HTML TAGS SHOWN WHEN PRINT/EXPORT TO PDF
    NOTE:749246.1 - OBIEE 10g: When a Report is Downloaded to PDF Format it Shows the Embedded HTML Option Tag Values in the Report.
    BUG:12826562 - HTML TAGS AND CODE USED IN COLUMN FORMULA ARE VISIBLE IN REPORT PDF
    BUG:5747757 - NARRATIVE VIEW IN PDF DOES NOT KEEP FORMAT
    The workaround is to print the report to Excel or HTML.
    Thanks,
    -Amith.

  • When doing compare, unwanted text are highlighting

    Hi all
    When i do compare for old and new file, unwanted text are highlighting in compare document, becuase text are same but it indicates in compare. I am using Acrobat professioanl 8.1.3.
    How this happened?
    Thannks
    Jayesh

    You may want to consider an upgrade to the current version of Acrobat. There were substantial improvements to the Compare feature in Acrobat 9 and later. (There won't be any upgrades to Acrobat Professional 8.)

  • HTML text area

    Hi
    I'm writing a small ewb email application, and I want the compose page to have an HTML edit pane, something like Yahoo or Hotmail. Is there such an editable text area supporting graphical text additions?
    Thanks

    here is a list of some:
    http://www.htmlarea.com/directory/WYSIWYG_Editors/index.html
    enjoy

  • Need Help Regarding Deletion(Text area)

    Hi everyone,
    Can anyone tell me how to use delete() method to delete a text written in the text area? I have it as a menu item, i have added an action listener for that and a shortcut key for the same on backspace. But i am not able to get it worked. Thanks for writing back.
    Cheers

    It's hard to impossible to see exactly what you are doing or what you are doing wrong based on what you tell us.
    I think that at this point you'll have to post some code. I recommend that you create and post the smallest program possible that is compilable, runnable, demonstrates your problem, and has no extraneous code not related to the problem, an [SSCCE.|http://sscce.org] Please see the link for details on how to create one of these because trust me, if your SSCCE is compliant with the specs, you'll likely get a very helpful answer from someone here quickly.

  • html:text styleid problem while using document.getElementById -very urgent

    Hi all,
    I am using the following struts code in my jsp.
    Each time when I click the checkbox corresponding to each record, I want the screencode to be displayed using the javascript alert.
    But always I am getting the same screencode (only the first screencode).
    What I should do to get the screencode for the corresponding selection of the checkbox
    <logic:iterate id="slist" name="scrlist" scope="session" >
    <html:text property="screencode" name="slist" styleId="sc" indexed="true"/>
    <bean:write name="slist" property="screen"/>
    <html:checkbox property="readchk" alt="Select to enable read right" onclick="javascript:alert(document.getElementById('sc').value)"/>
    </logic:iterate>
    Could anybody help me to fix this problem as soon as possible
    parvathy

    The tricky thing about Ajax is that it's asynchronous. That's the point...
    What you need to do is return a success or fail status from your servlet (or whatever ServiceAuth is...), let's say a 1 or 0. (0 bad, 1 good). You could even get real fancy and return 0 for username doesn't exist, 1 for password doesn't match user name or 2 for success.
    Then have your javascript update the page based on the response received. On a fail response call some javascript method that displays your related Uh-oh message, and on a successresponse call some method that updates the document.location of the page.
    HTH.

  • By using Java scripting how  can  compare database value to Forms value?

    i develop portal form n want to compare field that is Issued quantity with available quantity through java scripting.please send me syntax with an example.
    problem:
    if issued quantity is greater than available Quantity then appear alert message
    Thanks,
    Sadaf

    this is the false forum for you. Try it in the database forum e.g.

Maybe you are looking for