Dynamically validating datatable elements using javascript

Hai, iam using jsf, and having Xml mapping to the form elements to display the data . Iam using <h:datatable> inside which iam haveing repeated elements, i need to do a javascript validation before displaying the form element present inside the <h:datatable> columns.Iam also using <j4j:idproxy> , the java script is working for 1 iteration but it is the dataof the form element is not getting overridden in the 2nd iteration, It is somethinglike this below.
<TR id="buiCoverRowId" style="display:none;">
<TD height="9" width="200"></f:verbatim> <h:outputText
styleClass="outputText" id="text7"
value="Buildings Cover"></h:outputText><f:verbatim></TD>
<TD height="9" width="516"></f:verbatim> <h:outputText
styleClass="outputText" id="buildCoverId"
value="#{pathPart.xpathMap['./BuildingsCover/CoverDetail/SumInsured/Amount']}">
</h:outputText> <f:verbatim></TD>
</TR>
<TR>
<TD></f:verbatim><f:verbatim>
<h:inputHidden id="hidBuiCoverId"
value="#{pathPart.xpathMap['./BuildingsCover/CoverDetail/SumInsured/Amount']}">
<j4j:idProxy id="hidBuiCoverId_" />
</h:inputHidden>
</f:verbatim><f:verbatim></TD>
<TD></f:verbatim><f:verbatim>
<h:inputHidden id="hidExBuiCoverId"
value="#{pathPart.xpathMap['./BuildingsCover/ExcludedInd/Value']}">
<j4j:idProxy id="hidExBuiCoverId_" />
</h:inputHidden>
</f:verbatim><f:verbatim></TD>
</TR>
<SCRIPT>
alert("HAI");
var buidcover = document.getElementById('hidExBuiCoverId_').title;
var buidcoverR =document.getElementById(buidcover).value;
alert("the value of buildcover----->"+buidcoverR);
var buId =document.getElementById('hidBuiCoverId_').title;
var entitybuId1 = document.getElementById(buId).value;
entitybuIdT1 = trim(entitybuId1);
alert("entitybuIdT1"+entitybuIdT1);
var buExId = document.getElementById('hidExBuiCoverId_').title;
var entitybuExId1 = document.getElementById(buExId).value;
entitybuExIdT1 = trim(entitybuExId1);
entitybuExIdU1 = entitybuExIdT1.toUpperCase();
alert("entitybuExIdU1"+entitybuExIdU1);
if(!(entitybuIdT1 == null || entitybuIdT1 == '') && ((entitybuIdT1 == "0")) && (entitybuExIdU1 == 'FALSE'))
document.getElementById("buiCoverRowId").style.display="block";
</SCRIPT>
The form element is mapped to the xml. the above code is written within a datatable, iam using javascrpt within this to display the datat or not, it is working for first iteration but its not working for second iteration. Plz help me with this . Is there any way that i can use javascript so that it vvalidates the form elements even for the 2 iteration of the datattable. I am having thesame values (of the 1iteration) even during the 2 iteration. Plz help me with this asap.

Got the solution.
$("div.ms-acal-rootdiv div div div a").html().replace('Replace this text only.','Replaced Text');

Similar Messages

  • AnyChart: Dynamically add/remove series using javascript

    Hi all,
    The examples on the following page they dynamically show/hide series using javascript without any server side action.
    http://www.anychart.com/products/anychart/docs/users-guide/livesamples/js-series/index.html
    It seems they can do this because they add the chart to the page using javascript and so other js scripts can access a reference to the chart object. Looking at the code generated when you add a flash chart using Apex, it appears they are embedded flash. Does this stop us from using javascript to manipulate the chart object?
    Has anyone managed to do something like the example in the page above using the built-in charting of Apex?

    Between me and another poster we've sort of worked out a solution here - Re: Apex 4.0.2 Manipulate Flash Charts using Javascript?

  • Lock/Disabled/Readonly Element using Javascript

    hi,
    how to lock or disabled or make readonly element using javascript in APEX 3.2
    i need to lock/readonly popup element in the form
    CAN ANYONE HELP ME?

    A little complex, so possibly there will be a simpler solution than this.
    Immediately following the readOnly statement enter this code
      $x('P60_NAME').readOnly="readOnly";
      latag = $x('P60_NAME_holder').getElementsByTagName('A');
      for (i=0;i < latag.length; i++){
         latag.removeAttribute('href');
    This code removes the HREF attributes from the Image anchor.
    This should fix it.
    Regards,                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to do  validation in jsp using javascript

    how to do validation in jsp using javascript

    The same way you do with any HTML page.
    Catch the onclick/onsubmit event, do your validation in javascript and then allow/cancel the action as required.
    However this is javascript validation only - javascript can never call JSP code.

  • Counting xml elements using javascript

    How can I count the number of certain xml elements inside the xml file that import.
    Example xml:
    <list>
         <product>
              <name>Product_01</name>
              <detail>info here</detail>
         </product>
         <product>
              <name>Product_02</name>
              <detail>info here</detail>
         </product>
         <product>
              <name>Product_03</name>
              <detail>info here</detail>
         </product>
    </list>
    I would like to count the number of product -elements in this example xml.
    I'm using javascript for scripting.
    Thanks.

    #target indesign
    #include "/Applications/Adobe InDesign CS3/Scripts/Xml Rules/glue code.jsx"
    var myDocument = app.activeDocument;
    var myCounter = 0;
    var myRuleSet = new Array (new ProcessProduct);
    with(myDocument){
        var elements = xmlElements;
        __processRuleSet(elements.item(0), myRuleSet);
    alert("Found " + myCounter + " product elements");
    function ProcessProduct(){
        this.name = "ProcessProduct";
        this.xpath = "//product";   
        this.apply = function(myElement, myRuleProcessor){
            with(myElement){
                myCounter++;
        return true;

  • Urgent!! - Validating Any Element using schema

    Hi,
    I am relatively new to XML. I need to return the out in XML. Here is the sample schema
    <?xml version="1.0"?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                   targetNamespace="http://www.its.ws/Inventory"
         xmlns="http://www.its.ws/Inventory">
         <xsd:element name="RESULT">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="DESCRIPTION"/>
                        <xsd:any minOccurs="0"/>
                   </xsd:sequence>
                   <xsd:attribute name="Status" use="required" type="xsd:integer"/>
                   <xsd:attribute name="ErrorCode" use="required" type="xsd:integer"/>
              </xsd:complexType>
         </xsd:element>
         <xsd:element name="DESCRIPTION" type="xsd:string"/>
         <xsd:element name="DELIVERY">
              <xsd:complexType>
                   <xsd:sequence>
                        <xsd:element ref="po_del_date"/>
                        <xsd:element ref="po_del_qty"/>
                   </xsd:sequence>
         </xsd:complexType>
         </xsd:element>
         <xsd:element name="po_del_date" type="xsd:string" />
         <xsd:element name="po_del_qty" type="xsd:string"/>
    </xsd:schema>
    And here is my XML
    <?xml version="1.0"?>
    <Result xmlns="http://www.its.ws/Inventry"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://www.its.ws/Inventry Inventry.xsd"
              Status="1" ErrorCode="12">
              <Description>Vendor Code is NULL</Description>
              <Delivery>
                        <PurchaseOrderDelDate>2002-09-24</PurchaseOrderDelDate>
                        <PurchaseOrderDelQty>100.00</PurchaseOrderDelQty>
              </Delivery>
    </Result>
    In my XML file,
    I may or may not have Delivery element.
    If allows to have delivery element, doesn't validated it.
    When i validated in XMLWriter, it validates the Delivery element.
    Is this a bug in Oracle XML Engine or i am missing anything.
    Thanks in advance for ur advice

    Sorry, thats not the correct xml file.
    <?xml version="1.0"?>
    <RESULT xsi:schemaLocation="http://www.its.ws/Inventory ResultAny.xsd"
              xmlns="http://www.its.ws/Inventory"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              STATUS="0"
              ERRORCODE="0">
         <DESCRIPTION>There is no description defined</DESCRIPTION>
         <DELIVERY>
                        <!--<po_del_date>asdf</po_del_date>
                        <po_del_qty>asdf</po_del_qty>
                        -->
         </DELIVERY>
    </RESULT>
    Above is sample XML file. I am not concentrating on namespace, schema file and location ect,
    I have commented po_del_date & po_del_qty. There present is mandatory. It just checks whether xml file is proper or not, it does not validate, DELIVERY elements childs.
    When i validate it in XMLWriter, which users MSXML 4.x, it validates.

  • To dynamically  generate text box using javascript

    hi...
    i want to have a button such that if he clicks that button 2 textboxes be generated side by side.
    i want the textboxes to be added just above the button so that the button is always below the newly created textboxes.
    its not only once i want this ..i want that whenever he clicks the button 2 textboxes gets added everytime...
    how can i achieve this?
    thanks

    Ok, so this is a complete thread hijack - probably would have been worth a new thread.
    The initial solution involved javascript completely.
    The problem breaks down to
    1 - identify when we should move focus
    2 - identify which field focus should move to.
    Here is one version. This approach gives each textfield an individual name/number so you can find its "matching" pair.
    <html>
    <head>
      <script>
      var numLinesAdded = 0;
      function focusNext(tBox){
        var name = tBox.name;
        var index = name.substring(name.indexOf('_')+1);
        var brother = eval("document.all.txt2_" + index);   
        var l = tBox.value.length;   
        if (l >= tBox.maxLength){
          brother.focus();
         function generateRow() {
         var d=document.getElementById("div");
         d.innerHTML+="<input type='text' maxlength='5' name='txt1_" + numLinesAdded + "' onkeypress='focusNext(this)'>";
         d.innerHTML+="<input type='text' name='txt2_" + numLinesAdded + "'><br>" ;
         numLinesAdded++;
    </script> 
    </head>
    <body>
    <form>
    <div id="div"></div>
    <input type="button" value="Add" onclick="generateRow()"/>
    <input type="submit">
    </form>
    </body>
    </html>

  • Validating Digital Signatures using javascript

    i have created a sign field and a button. if user doesnt fill the sign and presses the button,the a error msg should appear. i have written the following java script for tat.kinldy help.its not working.
    if
    (event.target.getField("data.page.SignatureField1").signatureInfo().name == null)
    app.alert("fill signature");
    note:the following code is written in button's click event.
           : data.page.SignatureField1  is the signature field.

    Hi,
      Please check the Acrobat forum:http://forums.adobe.com/community/acrobat
    If you are trying to modify a FormsCentral PDF form, you'll need to follow a few steps before you can edit it, please see:
    http://forums.adobe.com/docs/DOC-3661
    (please note that FormsCentral does not support signature currently)
    Thanks,
    Lucia

  • Using JavaScript to set value of Spry validated text field

    Why can't the value of a text field be set using JavaScript
    when it's validated using the Spry validation widget.
    Example (this works):
    <select name="birthdate_month" id="birthdate_month"
    onChange="document.getElementById('birthdate').value = 'test';">
    <option>1</option>
    <option>2</option>
    </select>
    <input type="text" name="birthdate" id="birthdate"
    value="">
    Example (this doesnt work):
    <select name="birthdate_month" id="birthdate_month"
    onChange="document.getElementById('birthdate').value = 'test';">
    <option>1</option>
    <option>2</option>
    </select>
    <span id="birthdate">
    <input type="text" name="birthdate" id="birthdate"
    value="">
    <span class="textfieldRequiredMsg">please enter your
    birthday</span>
    </span>
    <script type="text/javascript">
    <!--
    var birthdate = new
    Spry.Widget.ValidationTextField("birthdate", "none");
    //-->
    </script>
    Is there a way to change the value of a Spry validated text
    field using JavaScript?
    Thanks.

    Why can't the value of a text field be set using JavaScript
    when it's validated using the Spry validation widget.
    Example (this works):
    <select name="birthdate_month" id="birthdate_month"
    onChange="document.getElementById('birthdate').value = 'test';">
    <option>1</option>
    <option>2</option>
    </select>
    <input type="text" name="birthdate" id="birthdate"
    value="">
    Example (this doesnt work):
    <select name="birthdate_month" id="birthdate_month"
    onChange="document.getElementById('birthdate').value = 'test';">
    <option>1</option>
    <option>2</option>
    </select>
    <span id="birthdate">
    <input type="text" name="birthdate" id="birthdate"
    value="">
    <span class="textfieldRequiredMsg">please enter your
    birthday</span>
    </span>
    <script type="text/javascript">
    <!--
    var birthdate = new
    Spry.Widget.ValidationTextField("birthdate", "none");
    //-->
    </script>
    Is there a way to change the value of a Spry validated text
    field using JavaScript?
    Thanks.

  • How to set a form element value using javascript?

    Hello,
    I have been using the following two functions in AS 9.0.2 to set form values in javascript and it works correctly. However, the same code does not work in AS 10.1.2.0.2. Would appreciate if someone could let me know how to set form elements using Javascript(onchange of a field).
    function set_item_value(p_field_name, p_value)
    var v_index, v_full_name;
    for(v_index=0; v_index<document.forms[0].length; v_index++)
    v_full_name = document.forms[0].elements[v_index].name.split
    if (v_full_name[2] == p_field_name)
    document.forms[0].elements[v_index].value = p_value;
    function get_item_value(p_field_name)
    var v_index, v_full_name, v_return="";
    for(v_index=0; v_index<document.forms[0].length; v_index++)
    v_full_name = document.forms[0].elements[v_index].name.split
    if(v_full_name[2] == p_field_name)
    if(document.forms[0].elements[v_index].type != "radio")
    v_return = document.forms[0].elements[v_index].value;
    else
    if(document.forms[0].elements[v_index].checked)
    v_return = document.forms[0].elements[v_index].value;
    if(v_return == " ")
    v_return = "";
    return v_return;
    Thanks
    Dev

    This is not the best way to write JavaScript in Portal environment!
    You can't be sure that a form is the first in the html source!
    In Portal you change the order of your portlets, and also you can have several instances of the same portlet on the same page!!!
    You should use qualified form and field names!
    Please check the following JPDK methods:
    UrlUtils.htmlFormName
    HttpPortletRendererUtil.portletParameter

  • RRI drilldown on structures using javascript and Web API

    Hi SDN community,
    We have devised a method to RRI on structure elements using javascript and Web API statements:
    var url = SAP_BW_URL_Get();
    zREP_UNIT_VAR1 = "ZN_MRU01";
    zREP_UNIT_VAR2 = "ZP_FPER";
    var zeroFISCYEARKey = getVar("ZPFYEAR");
    var zREP_UNITHierNodeKey = getVar("ZN_MRU01");
    var zREP_UNITHierNodeKey = trimString(zREP_UNITHierNodeKey);
    var zeroFISCPERVarKey = getVar("ZP_FPER");
    var zeroFISCPERKey = convertZeroFISCPERVarKeyToKey (zeroFISCPERVarKey);
    var zeroCURRENCYKey = getVar("ZPM_CURR");
    zREP_UNIT_TEMPLATE = "ZWT_CPERF_M50_UC_CHART";
    url = SAP_BW_URL_Get() + "&CMD=LDOC&TEMPLATE_ID=" + zREP_UNIT_TEMPLATE +"&VAR_NAME_1=" + zREP_UNIT_VAR1 + "&VAR_VALUE_EXT_1="  + zREP_UNITHierNodeKey  + "&VAR_NODE_IOBJNM_1=" + "0HIER_NODE" + "&VAR_NAME_2=" + zREP_UNIT_VAR2 + "&VAR_VALUE_EXT_2=" + zeroFISCPERKey + "&VAR_VALUE_EXT_3=" + zeroCURRENCYKey + "&CMD_1=DATA_PROVIDER%3DFY" + "%26FILTER_IOBJNM_1%3D"+ filter + "%26FILTER_VALUE_1%3D"  + parameter1 + "&CMD_2=DATA_PROVIDER%3DCMYTD" + "%26FILTER_IOBJNM_2%3D"+ filter + "%26FILTER_VALUE_2%3D"  + parameter1;
    SAPBWOpenWindow(url,"IO_Process_KPI_Report","width=screen.width, height=screen.height,menubar=yes, toolbar=no, scrollbars=yes, resizable=yes");
    Necessary conditions:
    The same Global Structure is in the Sender Query and the Target Query
    Question:
    Is there any other way to RRI on structure elements within a sender query to a target query using:
    BADI's, ABAP or any other method.
    Thank you.
    Simon

    Hi SDN Community,
    At the time of asking this question there were not many examples of BADI for RRI's.  I now see a number of examples we can use.
    Thank you.
    Simon

  • Building a dynamic dialog in Acrobat with Javascript

    I am attempting to figure out how to build dynamic dialogs within Acrobat using Javascript.
    I am attempting to write a generalized PDF page splitter.  The user selects a PDF document, and then the script analyzes the open document and determines that there are N pages in the document.  I am going to run through the document and make each page its own PDF.  Each page will be considered a certain kind of page, for example, Cover, Article, Ad, etc.  and the type of page it is will affect the naming convention I use when making the new, one-page file.  For example, let's say that pages 36, 37 and 38 are page, ad and article, respectively.  Then the names I will be using for each output file will be as follows:
    P12345Pg_036.pdf
    P12345Ad_037.pdf
    P12345Ar_038.pdf
    But there is no way for my code to actually look at a given page and decide that it is page, article, ad, or one of four cover types, etc.  So I want to build a dialog that looks something like this (assume a O is meant to be a radio button):
    Page          Pagetype
    1                  O Page      O Inner cover Front         O  Outer cover Front     O Ad           O   Article
    2             
    O Page 
    O Inner cover Front    
    O  Outer cover Front
    O Ad      
    O   Article
    3             
    O Page 
    O Inner cover Front    
    O  Outer cover Front
    O Ad      
    O   Article
    4             
    O Page 
    O Inner cover Front    
    O  Outer cover Front
    O Ad      
    O   Article
    N             
    O Page 
    O Inner cover Front    
    O  Outer cover Front
    O Ad      
    O   Article
    Beacuse each document varies in length, that means the dialog will need to be dynamic.
    I have looked at the Acrobat API and determined that defining a dialog looks something like this:
    var DialogABC = {
                                       initialize: function(dialog){},
                                       commit : function(dialog){},
                                       description:{}
    app.execDialog(DialogABC)
    What I do not know how to do is create the dialog specification on the fly.  Do I treat it as a string or is there some other way of making this happen?  How can I make a dynamic description that allows for a variable number of rows?
    Please let me know if you have any thoughts.  A good reference or example would serve just as well.
    TIA!
    John

    There are two approaches to this:
    1. Treating the dialog object as a literal object
    2. Treating it as a string
    If you treat it as a literal object you can manipulate it like any other object. Each function can be defined separately, and the items in the various arrays can be added or removed as you please.
    If you treat it as a string then you can construce that string in a dynamic way, using loops or if-conditions, as you please, and then use the eval() command to convert it to an object when done.
    Both approaches are quite complex and require a lot of scripting experience to implement correctly.

  • How to include HTML file in JSP using HTML elements or Javascript?

    Hi,
    I have around 15000 static html files one for each item which we display each upon invoking an item.The HTML file should be part of a JSP file.
    Please note that the name of the HTML file is determined dynamically
    Placing all the HTML files within the web application does not give us good performance so i would like to put all of them in the webserver.
    I am not able to include the file in the JSP using the jsp:include attribute if i place the HTML files in the webserver ,
    in order to do that i think should use either HTML element or javascript to include the HTML in the JSP.is there any alternative to <Jsp:include>
    Does anyone have an idea how to include the HTML file and take advan tage of webserver?
    Any ideas are appreciated

    What you need to do is simply read the HTML file from the disk and dump it out to the outputstream. It really is that simple.
    There's no reason you need to include all 15000 files in the actual WAR, you can place those files any place handy that is easy for the application to see (in another directory, or accessible from a file server if you have multiple front ends).
    Then, just write a utiility function that takes the output stream (i.e. the 'out' JSP variable), and the file name, read the file, and write it to the stream.
    If you start noticing performance issues, then you can try doing some caching, but truth is your OS should be doing that for you.
    But, truth be told that's the only practical way to do it.
    Another solution would be to use JavaScriipt and XMLHttpRequest (i.e "AJAX") to load the file at the client side, and simply replace a tag with the results.
    That's also pretty trivial to write, any web site talking about AJAX should give you hint there.
    Of course, that won't work for folks who have JavaScript turned off, or some other incompatible browser, whereas the server side solution obviously works everywhere.

  • Pre-validation using JavaScript cannot work in JSF?

    Sometimes we need to do pre-validation using JavaScript in some senarios that data need be entered and validated at client site before it reaches to Web Application Server. Remind that JSF is a server validation. Creator seems not to allow Developers to do pre-validation using JavaScript for any editable input fields in form. I will illustrate an example and hope anyone can help me to solve it out.
    Assume that if we write the a new web page that allows User enters Name and Phone. The pre-validation function called test() is written in JavaScript for validating field Phone. For simplicity, the below HTML/JavaScript without nested in table is a simple one for HTML form.
    <html>
    <body>
    <script language="JavaScript">
    function test(){
         if (form1.phone.value == "")
              alert("Please enter phone number in digits.");
              return false;
    </script>
    <form name=form1>
    <input id="phone" type="text" size=20><Br>
    <input id="name" type="text" size=20><Br>
    <input type="submit" id="submit" onclick="test()" value="Submit">
    </form>
    </body>
    </html>
    Now, we consider using Java Studio Creator to generate the same form as describing above. The script is shown below:
    <?xml version="1.0"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <html>
    <head>
    <title>testForm Title</title>
    </head>
    <body rave-layout="grid">
    <h:form binding="#{testForm.form1}" id="form1">
    <h:inputText binding="#{testForm.textField1}" id="phone" style="position: absolute; left: 192px; top: 96px; width: 168px; height: 23px"/>
    <h:inputText binding="#{testForm.textField2}" id="name" style="position: absolute; left: 192px; top: 144px; width: 168px; height: 23px"/>
    <h:commandButton binding="#{testForm.button1}" id="submit" style="position: absolute; left: 192px; top: 216px" value="Submit"/>
    </h:form>
    </body>
    </html>
    </f:view>
    </jsp:root>
    After running Script that Creator created, the HTML is generated and reduced (for simplicity) as follows:
    <f:view>
    <html>
    <body rave-layout="grid">
    <form action="/rave/rave" id="form1" method="post">
    <input id="form1:Phone" type="text"></input>
    <input id="form1:name" type="text"></input>
    <input id="form1:button1" value="Submit" onClick="test()"></input>
    </body>
    </html>
    </f:view>
    Take a look carefully at <input> elements. We see the syntax for naming for each "input" element that there is a semi colon added between form1 and phone or form1 and name. This syntax is generated from built-in JSF components. Hence, I rewrite the test() JavaScript function to match with the naming that Creator generated as follows:
    <script language="JavaScript">
    function test(){
         if (form1.form1:Phone.value == "")
              alert("Please enter phone number in digits.");
              return false;
    </script>
    Clearly, this JavaScript cannot be worked because of a semi column that Creator has named it.
    I have tried to work arround for this but cannot find a solution except changing the name such as: from <input id="form1:phone" ...> to <input id="form1_phone" ..>. But I could not change or modify the scripts because it is generated from JSF components when running it under browser.
    I guess to solve this problem, the naming for elements in form should be reconsidered in the next release of Java Studio Creator.

    Hi Marie,
    I currently sucess in client pre-validation using JSF. I found a way to do it.
    Please take a look of how javascript has been added in the following scripts:
    <?xml version="1.0" encoding="UTF-8"?>
    <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <html lang="en-US" xml:lang="en-US">
    <head>
    <meta content="no-cache" http-equiv="Cache-Control"/>
    <meta content="no-cache" http-equiv="Pragma"/>
    <title>login Title</title>
    </head>
    <body style="-rave-layout: grid">
    <h:form binding="#{login.form1}" id="form1">
    <h:outputLabel binding="#{login.componentLabel1}" for="componentLabel1" id="componentLabel1" style="position: absolute; left: 216px; top: 72px">
    <h:outputText binding="#{login.componentLabel1Text}" id="componentLabel1Text" value="Application System Name"/>
    </h:outputLabel>
    <h:panelGrid binding="#{login.gridPanel1}" columns="3" id="gridPanel1" style="position: absolute; left: 72px; top: 168px; width: 504px; height: 100px">
    <h:outputLabel binding="#{login.componentLabel2}" for="componentLabel2" id="componentLabel2">
    <h:outputText binding="#{login.componentLabel2Text}" id="componentLabel2Text" value="User Name: "/>
    </h:outputLabel>
    <h:inputText binding="#{login.textField1}" id="textField1" onclick="" style="width: 149px; height: 22px"/>
    <h:outputText binding="#{login.outputText1}" id="outputText1"/>
    <h:outputLabel binding="#{login.componentLabel3}" for="componentLabel3" id="componentLabel3">
    <h:outputText binding="#{login.componentLabel3Text}" id="componentLabel3Text" value="Password: "/>
    </h:outputLabel>
    <h:inputSecret binding="#{login.textField2}" id="textField2" style="width: 147px; height: 22px"/>
    <h:outputText binding="#{login.outputText2}" id="outputText2"/>
    <h:outputLabel binding="#{login.componentLabel4}" for="componentLabel4" id="componentLabel4">
    <h:outputText binding="#{login.componentLabel4Text}" id="componentLabel4Text"/>
    </h:outputLabel>
    <h:commandButton action="#{login.ok_action}" binding="#{login.button1}" id="button1" onclick="return checkUserIdentity(this.form)"
    style="width: 90px; height: 25px" value="OK"/>
    <h:outputLabel binding="#{login.componentLabel5}" for="componentLabel5" id="componentLabel5">
    <h:outputText binding="#{login.componentLabel5Text}" id="componentLabel5Text"/>
    </h:outputLabel>
    </h:panelGrid>
    </h:form>
    </body>
    <script type="text/javascript">
    function checkUserIdentity(form){
    var userName = form["form1:textField1"].value;
    var userPassword = form["form1:textField2"].value;
    if (userName == "") {
    alert("Please enter User Name.");
    form["form1:textField1"].focus();
    return false;
    if (userPassword == "" ){
    alert("Please enter password.");
    form["form1:textField2"].focus();
    return false;
    form.submit();
    return true;
    </script>
    </html>
    </f:view>
    </jsp:root>
    The key for getting data value from Form based on Javascripts is var userName = form["form1:textField1"].value;
    Thanks,
    VTT_

  • How to get values from a table(in jsp) for validation using javascript.

    hi,
    this is praveen,pls tell me the procedure to get values from a table(in jsp) for validation using javascript.
    thank you in advance.

    Yes i did try the same ..
    BEGIN
    select PROD_tYPE into :P185_OFF_CITY from
    magcrm_setup where atype = 'CITY' ;
    :p185_OFF_CITY := 'XXX';
    insert into mtest values ('inside foolter');
    END;
    When i checked the mtest table it shos me the row inserted...
    inside foolter .. Now this means everything did get execute properly
    But still the vallue of off_city is null or emtpy...
    i check the filed and still its empty..
    while mtest had those records..seems like some process is cleaining the values...but cant see such process...
    a bit confused..here..I tried on Load after footer...
    tried chaning the squence number of process ..but still it doesnt help
    some how the session variables gets changed...and it is changed to empty
    Edited by: pauljohny on Jan 3, 2012 2:01 AM
    Edited by: pauljohny on Jan 3, 2012 2:03 AM

Maybe you are looking for

  • To Put a Schedule line block while saving Sales Order

    Hi Experts, I have a requirement of putting an 'AH' block at schedule line. In the User exit USEREXIT_SAVE_DOCUMENT_PREPARE  i have coded it in the following manner.      loop at xvbep where posnr = xvbap-posnr.        xvbep-lifsp = 'AH'.        modi

  • Spool Spreadsheet Formatting is not align

    I have a program which excute a program f9 mode, then i select the output device, then select Format=X_65_200, then save into spool request, after the job finished, i see the graphical datalist in proper format.when i save to file as a spreadshheet i

  • Using iTunes 11 - How do you download and update iPhone Apps?

    Now that Apple has quaintly updated iTunes to version 11, I can no longer find the Applications listing on the LHS column which allowed easy updating of Applications prior to an iPhone synch. Gone through all of the menus and tabs but nada. I'm needi

  • Since upgrading to Maverick, I can't open my emails in aol on my iMac.  Any help?

    Recently upgraded to Maverick (OS X  version 10.9.4) on my IMAC.   I have a mail account on AOL.  Since my upgrade, I can't open any of my messages.  Searched the net and can't seem to get an answer.  Any ideas?

  • Hi, I need help please! Kaspersky keeps hanging

    I'm trying to let Kaspersky Virus Scanner search my MacBook, but it keeps hanging at 95 % while searching usr/share/devicemgr/webserver/gems/gems/rack-1.0.1./examples/. Could anybody help me please? I've already updated my Mac and Kaspersky, but noth