TableView row cell content validation using Javascript

Hi ,
   I need to validate the tableView cell which is opened for input as like text box using Iterator. I have a requirement to validate the cell when the row is selected.
   I tried with document.getElementById("solgrp_1_1").value, where solgrp is tableView id.
  Some how it is not working for me? and the second how can i recognise the row is selected or not in java script.
  Any input will help me. please sesuggest with your ideas.
Regards,
Praveen

Hi Jan,
If I undestood your question properly, you cannot know for sure that the row will be - in the end - selected because of the singleselect/multiselect issue.
So, either you put the logic on the server side and give up the JS solution... or you have to inject some variables mirroring the selectionMode into Javascript so that you can test it in your JS validation function.
Regarding the value of a cell, you can peform a document.getElementById( <id> ).value where <id> is of the form :
<id_of_the_tableview>_<row_index>_<col_index>
Check this in the source code of your page.
Best regards,
Guillaume
Best regards,
Guillaume

Similar Messages

  • 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

  • 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_

  • HTMLB Form Validation using JavaScript

    Hi All,
    <b>
    I have created a portal appliaction using JspDynPage.
    I have created a form using HTMLB tags. I want to validate the inputfields before sending it to the server for processing.
    The validation has to be done using Javascript
    </b>
    <b> How do i got about this ??? </b>
    regards
    Brahmachaitanya

    I have written the following code to perform the validation.......
    <b>
    function validate()
              var funcName=htmlb_formid+"_getHtmlbElementId";
                func=window[funcName];
              var inpBox1 = eval(func('if1'));
              var eno=inpBox1.getValue();
              if(eno=='' || eno==null)
                   alert('Please Enter Employee Number');
                   htmlbevent.cancelSubmit=true;
              var inpBox2 = eval(func('if2'));
              var ename=inpBox2.getValue();
              alert(ename);
              if(ename=='' || ename==null)
                   alert('Please Enter Employee Name');
                   htmlbevent.cancelSubmit=true;
              var inpBox3 = eval(func('absencetype'));
              var atype=inpBox3.getValue();
              if(atype=='' || atype==null)
                   alert('Please Enter Absence Type');
                   htmlbevent.cancelSubmit=true;
              var inpBox4 = eval(func('if4'));
              var from=inpBox4.getValue();
              if(from=='' || from==null)
                   alert('Please Enter From Date');
                   htmlbevent.cancelSubmit=true;
              var inpBox5 = eval(func('if5'));
              var to=inpBox5.getValue();
              if(to=='' || to==null)
                   alert('Please Enter To Date');
                   htmlbevent.cancelSubmit=true;
              var inpBox6 = eval(func('if6'));
              var approve=inpBox6.getValue();
              if(approve=='' || approve==null)
                   alert('Please Enter Approver Name');
                   htmlbevent.cancelSubmit=true;
    </b>
    The problem now is that i am getting the <b> alert message only for Employee Number.</b>
    <b> I am not getting the alerts if I leave the the other fields blank </b>
    <b> How do i go about this ????????? </b>
    regards
    Brahmachaitanya

  • How to give dropdownlist validation using javascript

    I have a sharepoint list, In that list i have a dropdown field,in that field i have values <--select-->,ram, raj like this, when user selected the <--select--> value and then click on savs button, it has to show the validation message like user
    need to select the value like that,using javascript or jquery i need to validate that.

    Hi ,
    add the following code in by  editing page.
    <script src="http://code.jquery.com/jquery-1.11.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    $("input[value='Save']").click(function(){
    var value = $("select[title='dropdown column name'] option:selected").text();
    if(value!="1"){
    alert(value);
    return false;
    https://social.technet.microsoft.com/Forums/security/en-US/4cd9429a-2261-4446-87d4-188ad10ae6c1/how-to-put-validation-in-sharepoint-list-item-for-dropdown-value-that-user-cannot-jump-from-first-to?forum=sharepointdevelopment
    http://sharepoint-2010-world.blogspot.in/2013/11/validate-dropdownlist-using-jquery.html
    Regards,
    Rajendra Singh
    If a post answers your question, please click Mark As Answer on that post and Vote as Helpful
    http://sharepointundefind.wordpress.com/

  • Deleting a row from a table using javascript.......

    Hi,
    i am writting an application in which, i need the following:
    1. calling a javascript on a click of a button named "Delete"
    2. and javascript should delete that particular record under which the delete
    button is placed which means... i am placing a delete button and a checkbox
    under every record i display on my browser. When the check box is checked ,
    and when the user clicks Delete button, it should delete that particular record.
    Any one can help me in this please.....
    Thanks in Advance....
    Bala

    <p>The short answer: You can't. At least not the way you're asking to.</p>
    <p>
    JavaScript does not (to my knowledge at least, someone please correct me if I'm wrong) have any way of connecting to an Oracle database to query for content, though it is possible with DHTML to substitute content into the page.
    </p><p>
    To do what you want, you're going to have to look into server-side scripting languages. Among the more notable examples are PHP, Perl, JSP, and ASP. I would recommend PHP, especially with the PHP right here at Oracle.com.
    </p><p>
    Anyways, what you're probably going to want to do is have a unique identifier for each row which you would be passing to the server and mark each delete button with that identifier. If you want the operation to be extremely transparent, you would use a HTTP-POST-style form parameter passing as opposed to HTTP-GET (which would expose all arguments on the command line, plus or minus any encryption you attempt to discourage script kiddies from probing the quality of your code).
    </p><p>
    But the important point here: There is no way to not send a request to the web server and still do what you want to do.
    </p><p>
    Hope that helps.
    </p><p>
    Cheers.
    </p>

  • How do I clear a form text field during validation using JavaScript?

    I am just learning JavaScript and the Acrobat API.  I have a form created in adobe acrobat 9 standard (starting from an existing form in MS Excel).  There is a text field for a Social Security Number.  I have a custom format script and keystroke script and a custom validation script. I would like to add to the existing validation script, that if what is entered doesn't match the validation test, then clear out the field as in erase all the characters that were typed into the field.  I want this to happen no matter what.  So even if someone filled in a valid SSN number and then moved to the next field, but then went back to the SSN field and decided to change their entry and this new entry was "invalid" then clear out the field (do not revert to what was typed in the field originally, even though it was considered valid by the script).  (There is currently no default value for this field.)  Thank you inadvance for you help on this.
    Here is the current validation script:
    // only run when field not blank
    if (event.value != "")
    // RegExp for validation #########
    var re = /^(\d{3})(\d{2})(\d{4})$/
    if(re.test(event.value) == false)
    app.alert("Enter a 9-digit Social Security number with no spaces or special characters (e.g., 555555555). It will be converted to the format 555-55-5555.")
         //Here is where I've tried adding all of these lines, but none of them will clear out what is in the field
              //this.resetForm([event.target.name]);
              //event.target.value == "";
              //getField("SSN 1").value = getField("SSN 1").defaultValue;
              //getField("SSN 1").value == "";
              //event.rc = false;
    And incase these are somehow affecting it, here are the other scripts being processed on this field:
    Keystroke script:
    var input=event.value;
    var chars=input.length;
    if( event.willCommit || chars==8 )this.getField("Name 1").setFocus();
    Format script:
    var re = /^(\d{3})(\d{2})(\d{4})$/
    if(re.test(event.value) == true)
    // add "-"
    event.value = RegExp.$1 + "-" + RegExp.$2 + "-" + RegExp.$3;

    Thank you very much.  I did try that before, but I was using event.value == "";  I guess in this case I'm assigning the value of "", not making the value equal "".

  • Check box validation using Javascript

    Hi Everyone,
    I am using LiveCycle with my form that have multiple sections in the form that have questions that have a check box yes or  check box no next to it.  The user can either choose yes or no. Note: I am not using radio buttons.   I am looking for a Javascript function or code that when clicking a button I have set up as "regular" can check to see if a user selected either check boxes (yes) or check box (no) and validate that in that section the user has answered all question by selecting either yes or no.  Example; Section (1) has (5) questions with a yes or no check box next to each question.  I want to validate that the user selected 5 check boxes for this section (regardless if yes or no was answered for each)  if only 2 out od the 5 questions were answered with either yes or no.  I generate an error message. 
    I already have a function that searches the form and tells me how many manditory text fields have been left blank and throws an error.  I would like the check box function to be the same.  Any help would be appreciated.
    Thanks
    Jagan

    function validateCheckBox()
    if(document.TestJsp.BONUS.checked)
    return true;
    var len = document.TestJsp.BONUS.length;
    for(i = 0 ; i < len; i++)
    if(document.TestJsp.BONUS.checked)
    return true;
    return false;
    Sorry for the triple post. :=)

  • Form Validation using Javascript error when adding extra fields

    Hi,
    I have a form (with a few fields which require validation) which works just fine.  I have added extra fields to the form and require them to validate too.  My problem is that they are not showing via the behaviours/validation box and I can't figure out how to sort it!  They are contained within the form element.  I have tried to delate the original validation and start again but to no avail.
    Please can someone help me?
    Code below.
    Many thanks
    function MM_validateForm() { //v4.0
      var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
      for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
        if (val) { nm=val.name; if ((val=val.value)!="") {
          if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
            if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
          } else if (test!='R') { num = parseFloat(val);
            if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
            if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
              min=test.substring(8,p); max=test.substring(p+1);
              if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
        } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
      } if (errors) alert('The following error(s) occurred:\n'+errors);
      document.MM_returnValue = (errors == '');
    //-->
    <form action="contact_us.asp" method="post" name="contact" target="_parent" class="contentText" id="contact">
          <table width="100%" border="0" cellspacing="5" cellpadding="0">
            <tr>
              <td width="54%" class="subHeader">Full Name* </td>
              <td width="46%" class="subHeader"><input name="FullName" type="text" id="FullName" /></td>
            </tr>
            <tr>
              <td class="subHeader">Company Name </td>
              <td class="subHeader"><input name="CompanyName" type="text" id="CompanyName" /></td>
            </tr>
            <tr>
              <td class="subHeader">Address</td>
              <td class="subHeader"><input name="Address1" type="text" id="Address1" /></td>
            </tr>
            <tr>
              <td class="subHeader"> </td>
              <td class="subHeader"><input name="Address2" type="text" id="Address2" /></td>
            </tr>
            <tr>
              <td class="subHeader"> </td>
              <td class="subHeader"><input name="Address3" type="text" id="Address3" /></td>
            </tr>
            <tr>
              <td class="subHeader">Postcode</td>
              <td class="subHeader"><input name="Postcode" type="text" id="Postcode" /></td>
            </tr>
            <tr>
              <td class="subHeader">Telephone Number* </td>
              <td class="subHeader"><input name="Telephone" type="text" id="Telephone" /></td>
            </tr>
            <tr>
              <td class="subHeader">Mobile Number </td>
              <td class="subHeader"><input name="Mobile" type="text" id="Mobile" /></td>
            </tr>
            <tr>
              <td height="25" class="subHeader">Email Address* </td>
              <td class="subHeader"><input name="Email" type="text" id="Email" /></td>
            </tr>
            <tr>
              <td height="30" class="subHeader">Status*</td>
              <td class="subHeader"><select name="StatusClass" id="StatusClass">
                <option selected="selected">Please Choose</option>
                <option>Architect</option>
                <option>Interior Designer</option>
                <option>Private Client</option>
                <option>Student</option>
                <option>Trade Enquiry</option>
              </select>          </td>
            </tr>
            <tr>
              <td height="23" class="subHeader">Project*</td>
              <td class="subHeader"><select name="Project" size="1" id="Project">
                <option selected="selected">Please Choose</option>
                <option>Planning Stages</option>
                <option>New Build</option>
                <option>Refurbishment</option>
                <option>Barn Conversion</option>
                <option>No project - information only</option>
              </select>          </td>
            </tr>
            <tr>
              <td height="37" class="subHeader">How did you hear about us?*</td>
              <td class="subHeader"><select name="CameFrom" size="1" id="CameFrom">
                <option selected="selected">Please Choose</option>
                <option>Web Search</option>
                <option>Grand Designs</option>
                <option>Living Etc</option>
                <option>Home Building &amp; Renovation</option>
                <option>Architect</option>
                <option>Friend/Family</option>
                <option>Magazine/Editorial</option>
                <option>Newspaper Article</option>
                <option>Trade Show/Exhibition</option>
                <option>Other</option>
              </select></td>
            </tr>
            <tr>
              <td height="24" class="subHeader">Brochure Request </td>
              <td class="subHeader"><input name="Brochure" type="checkbox" id="Brochure" value="checkbox" /></td>
            </tr>
            <tr>
              <td class="subHeader">Message</td>
              <td class="subHeader"><span class="style4">
                <textarea name="Message" id="Message"></textarea>
              </span></td>
            </tr>
            <tr>
              <td class="subHeader"> </td>
              <td class="subHeader"><input name="Submit" type="submit" value="Submit" /></td>
            </tr>
            <tr>
              <td colspan="2" class="subHeader"><em>* Required fields</em></td>
            </tr>
          </table>
          </form>

    whoops..... forgot to post this line of code which was a bit further down the page...
    "MM_validateForm('name','','R','number','','RisNum');return document.MM_returnValue">

  • Using Javascript in a report region

    I have a text box that I need to populate with an amount for billing. There is also a field that shows the amount due. If the amount due is equal to the amount being paid, I want my user to click on the amount due, and it automatically populates the amount being paid. I am using the javascript:setValue('destination','origination'); command, but the problem is that I am unable to choose the text field in the javascript. I have tried using #value# aliasing, and htmldb_application.g_f0x and just f0x... nothing seems to properly alias the text box within the tabular form. Any ideas?
    Thanks,
    Scott

    Scott,
    I know a way to do this, but it is not an easy implementation and it is quite hard to explain. Carl is an Oracle guy so he may know of a better solution, but here is what I came up with on my own:
    First let's be familiar with the htmldb_item syntax (found in the html db documentation):
    HTMLDB_ITEM.TEXT(
    p_idx IN NUMBER, -- unique id
    p_value IN VARCHAR2 DEFAULT NULL, -- value of item
    p_size IN NUMBER DEFAULT NULL, -- HTML tag attributes
    p_maxlength IN NUMBER DEFAULT NULL, -- max length
    p_attributes IN VARCHAR2 DEFAULT NULL, -- HTML elements including where you incorporate the javascript for this item
    p_item_id IN VARCHAR2 DEFAULT NULL, -- id you can specify
    p_item_label IN VARCHAR2 DEFAULT NULL) -- labe you can specify
    I would create your report region using the following sql statement:
    select order_number "Order Number",
    name "Name",
    amount_due "Amount Due",
    lpad((ROW_NUMBER() OVER (ORDER BY order_number)),4,0) "Row Num",
    htmldb_item.text(7,amount_paid,null,null,null,'f07_'||lpad((ROW_NUMBER() OVER (ORDER BY order_number)),4,0) "Amount Paid"
    from tbl_orders
    where....
    order by order_number
    --i had to use an order by to get the ROW_NUMBER() to work
    This will create on every row an item that is specific to the row number. For example:
    Row # Amount Paid text box item ID
    1 f07_0001
    2 f07_0002
    500 f07_0500
    etc.
    This will allow you to reference items based on what row they are when using javascript.
    Next you need to create a link out of the the amount_due column. Go to the Report Region, then the Report Attributes tab. Click on the edit link for the amount_due column. Go to the Column Link section.
    Make link_text = to the value of amount_due column(#amount_due# probably)
    Make the Target = URL
    Make URL = javascript: setValues('#AMOUNT_DUE#','#ROW_NUM#');
    This will send the value of amount due and the row number.
    Here's the javascript you would put in your HTML Header on you Page Attributes:
    <script language="JavaScript1.1" type="text/javascript">
    function setValues(due, rownum){
    document.getElementById('f07_'+rownum).value = due;
    </script>
    Give that a shot. I just created a page and got that to work.
    Chris

  • Is it possible to use wildcards to match cell contents in an if statement?

    I need to return a ID along with some other information on a page by page basis, so that the information comes out linked by position.  I use a couple of loops and if statements to navigate through the document.  I am able to use exact matches of cell contents which is fine when the contents doesn't vary.  But the IDs, though they have a similar pattern, are all different. In a menu driven search, I am able to find what I need with '150^9^9^9^9^9-^9^9^9' But when I try putting this (or any number of [0-9], *, ? combinations) it fails.  Is it possible to use wildcards?  The symbol used for the match (==) makes me suspect that it is not possible and that only literal, exact matches will work.  But I wanted to check with the experts before giving up.
    Thanks
    pcbaz

    Thanks for the input.  You're right, a GREP search is much more efficient.  But what I'm trying to do and the circumstances here don't allow me, I think,  to go that route. I am trying to generate a list of values coming from several textframes on a single page and have them come out so that I can tell which values belong together.
    I'm using an inherited document with masters that were created 'manually';  the index numbering for textframes and tables is random. I navigate through the pages, looping through textframe indices asking ' does this textframe exist?' If so, I ask if it is a table -- if no, it is a simple textframe and I ask about the ID, if yes, I ask if the contents of cell (0,0) (invariant position and contents) are equal to the table I want..  I am sending the ID and other pieces of information from the table to one row of a new table on a new page.  So the ID and other information from a single page are linked by being in the same row.
    I know this a little 'off-normal' -- I'm using the search to navigate through the document and find things by location the way you do with a spreadsheet.  I have devised a work-around that helps me get around the fact that the ID is not invariant.  I create a list of the (exact) IDs from another document, equating them to a variable ('a').  I then loop through the list of IDs and ask if the contents of the textframe is equal to 'a'..This works o.k, unless there happens to be an extra space, a different kind of hyphen, etc. It would be so much easier if I could use the wildcards that work in a menu-driven text or GREP search in script just to ask about the contents of the textframe.
    Thanks again
    pcbaz (Peter BIerly)
    P.S. we have since rewritten the masters so this problem will not exist in the future -- we now know exactly which textframe and/or table indices to refer to to get any particular bits of information and don't need to ask questions about the contents.

  • TableView auto resize columns based on header text width or cell content

    Is there a method on the tableview or tablecolumn to automatically resize based on the content of the hearder or data?
    If not what approach can used used with JavaFX to calculate the string width based on the current font?

    The table column size is inconsistent, I set the columns in the table view and the items in the initialize method. I execute a service and task from a button action that loads data into the list, if I don't reset the columns in the table view in the succeed method then each column is the same width regardless of the content in the cells. If I do reset the table columns in the succeed method then the columns are resized based on content.
    I don't think it should be a requirement to reset the columns just to get the column widths to set based on the content in the cells. Is there a method on the table column or view that will resize the cells based on the cell content? I would prefer the largest value; column header content or the longest cell content for a column.

  • Retrieving and Resetting textEdit Content Using JavaScript

    I need to retrieve the content within a textEdit box using JavaScript, and then append a String to that content, and re-enter that content as the inner content of a textEdit box.  Does anyone know how to do this? 
    I tried using jsObjectNeeded for textEdit, but it is an invalid parameter for that object.  I also tried grabbing the ID in a round-about way in JavaScript using _1texteditor or _1htmlbeditor, but I get an "Object Expected" error everytime.
    Here is the item I am working with, and within my JS method, I need to grab the text inside, append a string to it, and reset that new content as the text within the edit box.
    <hbj:textEdit id="summaryBox"
       text="Add summary here."
       wrapping="SOFT"
       tooltip="Add summary here."
       rows="5"
       cols="70">
    This is the content inside the box.
    </hbj:textEdit>
    Thanks in advance for your help...

    Thank you for your help, guys, but neither suggestion solved my problem and I solved it on my own.  You have to find the parameter ID through a line of Java, like Damian had mentioned about an ID, but I was looking for the value within the textEdit, not the ID. 
    In the JavaScript method, you set a variable to the Java variable, which found the parameter ID.
    Then, using that JS variable, you do:
    var blah = <%=javaParameterId%>;
    var funcName = htmlb_formid+"_getHtmlbElementId";
    func = window[funcName];
    var textEditField = eval(htmlb_formid + "." + blah);
    var wordsWithTexEdit = textEditField.value;
    Thanks anyways...

  • How to get textbox text inside Repeater based on specific row dropdownlist selection using JavaScript

    Hi All,
    I have dropdownlist and textbox controls inside repeater control. Suppose when i select specific dropdownlist i want get the value of selected item and mean while i want to get the textbox text which in the same row.
    <script type="text/javascript">
    var ddlType;
    function ddl(ddl) {
    ddlType = ddl.value;
    alert(ddlType);
    </script>
    <asp:Repeater ID="RepterDetails" runat="server"
    onitemdatabound="RepterDetails_ItemDataBound"
    onitemcommand="RepterDetails_ItemCommand" >
    <ItemTemplate>
    <tr>
    <td>
    <asp:DropDownList ID="ddlTypeName" runat="server" onchange="ddl(this)"></asp:DropDownList>
    </td>
    <td>
    <asp:TextBox ID="txtCode" runat="server" Text='<%#Eval("otaRoomTypeCode") %>' />
    </td>
    </tr>
    </ItemTemplate>
    </asp:Repeater>
    Using the javascript i got the selected dropdownlist selected value, how to get the textbox text which is in the same row.
    Please give me advice and please find the repeater control screenshot.
    Thanking You, Nagendra.

    This forum if for C# issues, please move your post to asp.net forum:  http://forums.asp.net/
    Thanks
    Fouad Roumieh

  • How to Hide some Rows in a List view Web Part using JavaScript ?

    How to Hide some Rows in a List view Web Part using JavaScript ?

     Here is the code that worked for me:
    var Elements = document.querySelectorAll('div[id=WebPartWPQ3] table[class=ms-listviewtable]>tbody tr .ms-vb-lastCell.ms-cellstyle.ms-vb2')
    for(var i=0, n = Elements.length; i < n; i++)
     if(Elements[i].innerHTML=="India")
    Elements[i].parentNode.setAttribute("style","display:none")
    WebPartWPQ3 -> ID of webpart Div
    ms-listviewtable -> class name of table in Div
    ms-vb-lastCell.ms-cellstyle.ms-vb2 -> classname of td to get text

Maybe you are looking for

  • All my LOOPS disappeared from L8 Loop browser.  HELP Please !

    hi, my loops do not show up in my loops browser in logic 8 all of a sudden. yesterday the did, and now, there is nothing there. all the choices like "dark" or "experimental" or "guitars" etc. no longer highlight. the only button that highlites is "Al

  • FaceTime works on iPhone but not macbook..? HEEELP.

    Facetime makes/recieves calls as per usual with iphone, but Macbook pro is unsuccessful- says 'connecting' and rings without ever getting through/does not recieve incoming facetime from other devices.

  • Can you share STEP BY STEP CREATION DOCS OF  SAP BW OBJECTS

    Hello All, I am a SAP BW learner......Please help me Can you please share step by step creation documents with me. Mail id is <b>[email protected]</b>

  • Strange behavior in a table with dropTarget and delete action

    I am having a strange behavior in a table with drag and drop and action component to delete row. Steps: Drag the first row to the table and appears in the destination table (works well) Select and change the value by 156, appears an error (works fine

  • Value drop down list control in ADOBE Form

    We are on SP16 currently. We are developing an ADOBE interactive online form using ABAP WebDynpro. To display search help of a few fields like Vendor Number, G/L Account Number, Cost Center, we are using 'Value Help Drop Down List' control availalbe