Targeting all objects in multiple subforms with a shared name throughout a form

Hi
Jono Moore was able to find an excellent solution from an original by Radzmar for targeting subforms throughout a form that share a name:
function hideSubs(vNode) {
     if (vNode.className === "subform") {
          //name of subform you're targeting
          if (vNode.name === "targetSub") {
               vNode.presence = "hidden";
     for (var i = 0; i < vNode.nodes.length; i += 1) {
          hideSubs(vNode.nodes.item(i));
hideSubs(xfa.form);
Has anyone any thoughts on how to extend this functionality to select the object within those subforms?
So:     (1) find all subforms with the shared name (a solution above), then
          (2) select all objects inside those subforms only (all types: text fields, radio buttons, check boxes, etc.).
The intention is to lock these down and to apply a colour change (from white to grey) as a visual cue. The solution above allows the background colour of the subforms to be changed, but what is required in this case is a colour change to the value backgrounds of the objects within those subforms only.
Any thoughts grately appreciated.
Thanks

Francis play around with the above code, it's a simplified version of the script you are using.
I've used that node traversal script for a bunch of stuff myself but I'm trying to wrap my head more around Radzmar's simplified version as it looks like it would be a lot faster for larger forms. And it's getting into areas I don't know much about so I'm learning stuff too!

Similar Messages

  • Targeting multiple subforms with a shared name throughout a form

    Hi
    I've found a few hints at this online, but to date with little detail as to successful methods.
    Has anyone had any success with targeting subforms that have the same name throughout a form? The intention is to hide or disable the contents of those subforms by using a script.
    These subforms are numerous and at various locations throughout the form, so I'm trying to find a way to use the common name to target all of these at once, as opposed to specifying absolute locations for all of these subforms. By means of comparison, what comes to mind is how classes can be used in CSS to target multiple elements. My initial thought is something along the lines of getElements, although I've hit a bit of a brick wall so far!
    Any thoughts would be greatly appreciated!
    Thanks

    You could do it by nesting functions. I'd make a script object to store the functions and then call them from there.
    So you'd have a function to find the subforms, a function to target the fields, etc. Then when you've found your subform you call another function to go through the subform and do what you need to the fields.
    I haven't tested it but I'm pretty sure with Radzmar's function you can target individual subforms, etc. For example the line that calls the the function below, hideSubs(xfa.form), could target specific form like hideSubs(form1.subform1.subform2).
    This is very pseudocode-y, I haven't bothered changing the name of the function. The colourFields function would look kinda like the hideSubs function but target fields instead of subforms. I don't have time to figure it out right now but might be able to take a look at it this weekend.
    function hideSubs(vNode) {
         if (vNode.className === "subform") {
              //name of subform you're targeting
              if (vNode.name === "targetSub") {
                   //call function colourFields
                   colourFields(targetSub);
         for (var i = 0; i < vNode.nodes.length; i += 1) {
              hideSubs(vNode.nodes.item(i));
    hideSubs(xfa.form);

  • [svn] 949: Bug: BLZ-96 - When sending a HttpService request from ActionScript with multiple headers with the same name , it causes a ClassCastException in the server

    Revision: 949
    Author: [email protected]
    Date: 2008-03-27 07:12:59 -0700 (Thu, 27 Mar 2008)
    Log Message:
    Bug: BLZ-96 - When sending a HttpService request from ActionScript with multiple headers with the same name, it causes a ClassCastException in the server
    QA: Yes - try again with legacy-collection true and false.
    Doc: No
    Checkintests: Pass
    Details: Another try in fixing this bug. When legacy-collection is false, Actionscript Array on the client becomes Java Array on the server and my fix yesterday assumed this case. However, when legacy-collection is true, Actionscript Array becomes Java ArrayList on the server. So added code to handle this case.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-96
    Modified Paths:
    blazeds/branches/3.0.x/modules/proxy/src/java/flex/messaging/services/http/proxy/RequestF ilter.java

    Hi all!
    Just to post the solution to this if anyone ever runs accross this thread...
    For some reason i had it bad the first time, don't have time right now to see why but here is what worked for me:
    HashMap primaryFile = new HashMap();
    primaryFile.put("fileContent", bFile);
    primaryFile.put("fileName", uploadedFile.getFilename());
    operationBinding.getParamsMap().put("primaryFile", primaryFile);
    HashMap customDocMetadata = new HashMap();
    HashMap [] properties = new HashMap[1];
    HashMap customMetadataPropertyRoom = new HashMap();
    customMetadataPropertyRoom.put("name", "xRoom");
    customMetadataPropertyRoom.put("value", "SOME ROOM");
    properties[0] = customMetadataPropertyRoom;
    customDocMetadata.put("property", properties);
    operationBinding.getParamsMap().put("CustomDocMetaData", customDocMetadata);
    Basically an unbounded wsdl type is an array of objects (HashMaps), makes sense, i thought i had it like this before, must have messed up somewhere...
    Good luck all!

  • [svn] 931: Bug: BLZ-96 - When sending a HttpService request from ActionScript with multiple headers with the same name , it causes a ClassCastException in the server

    Revision: 931
    Author: [email protected]
    Date: 2008-03-26 11:31:01 -0700 (Wed, 26 Mar 2008)
    Log Message:
    Bug: BLZ-96 - When sending a HttpService request from ActionScript with multiple headers with the same name, it causes a ClassCastException in the server
    QA: Yes - we need automated tests for this basic case.
    Doc: No
    Checkintests: Pass
    Details: RequestFilter was not handling multiple headers with the same name properly.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-96
    Modified Paths:
    blazeds/branches/3.0.x/modules/proxy/src/java/flex/messaging/services/http/proxy/RequestF ilter.java

    Hi all!
    Just to post the solution to this if anyone ever runs accross this thread...
    For some reason i had it bad the first time, don't have time right now to see why but here is what worked for me:
    HashMap primaryFile = new HashMap();
    primaryFile.put("fileContent", bFile);
    primaryFile.put("fileName", uploadedFile.getFilename());
    operationBinding.getParamsMap().put("primaryFile", primaryFile);
    HashMap customDocMetadata = new HashMap();
    HashMap [] properties = new HashMap[1];
    HashMap customMetadataPropertyRoom = new HashMap();
    customMetadataPropertyRoom.put("name", "xRoom");
    customMetadataPropertyRoom.put("value", "SOME ROOM");
    properties[0] = customMetadataPropertyRoom;
    customDocMetadata.put("property", properties);
    operationBinding.getParamsMap().put("CustomDocMetaData", customDocMetadata);
    Basically an unbounded wsdl type is an array of objects (HashMaps), makes sense, i thought i had it like this before, must have messed up somewhere...
    Good luck all!

  • XOQ-01950: Cube contains multiple BuildSpecifications with the same name.

    Hi All ,
    While executing the Maintain Cube option it is throwing below issue : Any Clue ?
    XOQ-01950: The AWCubeOrganization for cube "NN_OLAP_POC.MARKET_SALES_CUBE" contains multiple BuildSpecifications with the same name.
    Thanks,
    DxP

    This error should only show up when you create a cube (by importing XML), not when you maintain it. So I will assume that this is what you mean.
    If you import XML that refers to an OLAP object that already exists, then the new definition overrides the old one. The only exception to this rule is the BuildSpecification object. This kind of object is named, but it does not follow these conventions (for messy implementation reasons). If you import XML that has a BuildSpecificaiton with the same name as one that already exists, then you will trigger the error you see. Here is an example of the relevant XML.
    <BuildSpecifications>
    <![CDATA[BUILD SPEC LOAD_AND_AGGREGATE
      LOAD NO SYNCH,
      SOLVE
    ) ]]>
    </BuildSpecifications>The workaround is to delete this section from the XML before importing it.

  • Is it possible to search for multiple folders with the same name and...

    Is it possible to search for multiple folders with the same name and then select them all and change the permissions on just those folders .i.e. Search for the budget folders in all client folders and lock them down to just the project managers. Without having to go to each folder and apply the permissions.

    user11919409 wrote:
    Is it possible to create a Clone database with the same name of source db using RMAN ...
    yes
    >
    DB version is 11.2.0.2
    Is it possible to clone a 11.2.0.2 database to 11.2.0.3 home location directly on a new server . If it starts in a upgrade mode , it is ok ....yes
    Handle:     user11919409
    Status Level:     Newbie (10)
    Registered:     Dec 7, 2009
    Total Posts:     102
    Total Questions:     28 (22 unresolved)
    why do you waste time here when you rarely get any answers to your questions?

  • [svn] 889: Add test case for BLZ-82 where HttpService should return multiple headers with the same name .

    Revision: 889
    Author: [email protected]
    Date: 2008-03-21 13:08:05 -0700 (Fri, 21 Mar 2008)
    Log Message:
    Add test case for BLZ-82 where HttpService should return multiple headers with the same name.
    Ticket Links:
    http://bugs.adobe.com/jira/browse/BLZ-82
    Added Paths:
    blazeds/trunk/qa/apps/qa-regress/remote/MultipleHeadersTest.jsp
    blazeds/trunk/qa/apps/qa-regress/testsuites/mxunit/tests/proxyService/httpservice/MultiHe aderTest.mxml

    Hi again,
    this may be old news to some people, but I just realized we can have the desired benefits I originally listed (encapsulation, reuse, maintainability, security) TODAY by using pipelined functions and using the table() function in Apex report region queries.
    So the report query basically becomes, for example (if get_employees is a pipelined function)
    select * from table(my_package.get_employees(:p1_deptno))
    The only downside compared to a (weakly typed) sys_refcursor is that you have to define the type you are returning in your package spec (or as an SQL type). So it's a bit more coding, but it's still worth it for the other benefits it provides.
    I like Apex even better now! :-)
    - Morten

  • Can iTunes sync multiple songs with the same name?

    My iTunes library has multiple songs with the same name (but they point to different files on the filesystem).
    Curiously when iTunes syncs to my iPhone it will only ever sync two of the files, even if more exists. I suspect what is happening is described below, but I have no way of verifying it:
    Let's assume I have 5 songs named IdenticalName, on the filesystem these are named IdenticalName.mp3, IdenticalName 1.mp3, IdenticalName 2.mp3, and so on.
    I suspect iTunes is syncing the filename without a number postfix, and the file with the "1" postfix and not continuing with the rest of the files.
    Has anyone seen similar behaviour? Did you find a workaround (other than renaming your tracks)?

    can you manually discover the new instances on the new server?
    Then just make sure the name that appears in Grid Control is different.
    e.g. prod.world is on server A and B. When you discover in Grid control, you can make it prod_B and you will see the latter without any problem.

  • Writing to multiple tags with the same name

    Hi,
    I am writing to multiple tags with the same name but in different groups. I have noticed only the tag from the first group gets updated. How can I write to a tag in a specific group in this scenario?
    Regards,
    Chanti.

    Heres what I found.
    When I tried "http://<server>:<port>/XMII/Illuminator?Server=<Name of the TAG dataServer>&Mode=CurrentWrite&TagName=<Group>.<TagName>", the outcome was "Message
    Could not add "<Group>.<TagName>" to the response list.
    Message
    No tags selected."
    When I tried "http://<server>:<port>/XMII/Illuminator?Server=<Name of the TAG dataServer>&Mode=CurrentWrite&TagName=<TagName>", it seemed like it worked fine.
    Any thoughts?

  • Targeting all objects down the group structure

    Hi all.
    I have a tree of groups of several levels, like here
    http://i43.tinypic.com/29ok7sm.jpg
    Each group has some 5-10 objects, and I need to target each of them for some appearance change (the way it worked in Illustrator 9), without selecting each of them individually -- in total I have thousands of them. Clicking on "Contents" all the way down doesn't work because not all objects are on the same levels.
    Basically, I want object-level targeting only, and I want to disable "smart targeting".
    How do I do that?

    This is a case-in-point illustration of my complaint that Illustrator doesn't know the difference between something being selected as an object and merely having all its subparts selected.
    Despite Illustrator's insistence upon two selection pointers, the so-called Direct Selection tool (which I think should be renamed something sensible, like Subselect tool) doesn't always subselect. That is, as soon as you have all of the points of a path selected, the rest of the program acts as if the selection's parent (the path) is selected. So, for example, you then can't perform alignments on the supposedly direct-selected points.
    That problem cascades to the rest of the selection interface; supposedly "direct select" all of the objects in a Group, and other features in the program act like you have selected the Group.
    Even in math classes that involve set theory, it is stressed that a set is not the same thing as all of its members.
    Nor is Illustrator consistent even in this. Select a Group, apply a fill, and the fill is applied to each of the individual members. But apply an effect, like opacity, and the effect is applied at the Group level. This is by design. That doesn't make it intuitive.
    JET

  • Multiple hierarchies with a shared higher level in OBIEE

    Hello all,
    I'm trying to create multiple hierarchies for a shared dimension in OBIEE. I have gotten these to work in the past when each hierarchy for the dimension all shares the common “grand total” level at the top, but I now I'd like multiple hierarchies that share a common higher level that isn't the grand total level.
    Here's what I'm trying to do with a Customer Geography hierarchy. I want to give the user the option to drill from the customer "Country" and go either into "Cities" or "States":
    Grand Total level
    --->Country level
    ------> State level
    ---------> Customer detail level
    ------> City level
    ---------> Customer detail level
    So "Country" is the common parent of "State" and "City", and "State" and "City" each have" Customer detail" as the lowest level. The Admin Tool let's me build exactly this in my RPD (with no errors/warnings), but when I go to drill on Country in an Answers report, I don't get the option to navigate down to State or City; it just automatically drills into the underlying states -- never shows cities.
    I guess I was hoping there'd be a pop up option to ask the user which path I wanted to drill down on (kind of like what shows up for multiple navigation targets in an Answers request).
    Am I missing a setup step in my RPD for this multiple hierarchy? Is a shared higher level multiple hierarchy even possible in OBIEE?
    Thanks,
    Jeremy
    Edited by: OBI Wan on Mar 19, 2009 3:29 PM
    Edited by: OBI Wan on Mar 19, 2009 3:30 PM
    Edited by: OBI Wan on Mar 19, 2009 11:20 PM

    Thanks mma for the help. I thought I saw in your reply this link as well to RittmanMead, but it's not showing up now?
    http://www.rittmanmead.com/files/Advanced%20Development%20using%20OBIEE%20(ODTUG%202008).pdf
    Anyway, on slide 37 of Rittman's presentation, that screen shot he has of Country, City, and State is exactly what I am attempting to do. I was hoping my issue would be a bit more straightforward than the recommended ragged hierarchy work arounds, but I may still have to do something like that in the end.
    This issue just seems more simple than ragged hierarchies, because I start from the same level and end up back at the exact same level (instead of different destination levels as can be the case in ragged hierarchies). I don't know -- maybe my example is ragged as well.
    If Rittman got that hierarchy in his screen shot on slide 37 to work like I'm trying to, then that would be perfect. :)

  • Multiple documents with the same Name

    We had a problem reported where an xquery to the xml db returned multiple records. Upon reading the full db (getAllDocuments) and printing each document's name we found out that all the documents had the same the same Name!!!
    We are using 2.3.10
    This is very disturbing as we depend on the uniqueness of the Name heavily.
    Any ideas on how this could happen?
    What information would you need?
    Code used to dump data
    Message was edited by:
    user626230

    Hi,
    Are you using all of the patches to 2.3.10? You should be, or better yet, use 2.3.11. There was a bug that could be involved that is fixed in 2.3.11. Others have seen duplicate documents but the root cause has never been 100% identified.
    Be sure that you are aborting your deadlocked transactions properly.
    Is this issue reliably reproducible in any way? If so, I'd be very interested in a test case or working with you to figure out what sequence of events causes it.
    Regards,
    George

  • Issue with multiple Albums with the same name. (i.e. Greatest Hits)

    I have multiple albums all with the same name (i.e. Greatest Hits). iTunes mixes all of the albums as one. All of the track 1s together, all track 2s together .... Is there a way for iTunes to recognize that there is more than 1 album with the same name? and to keep each album seperate.
    Thanks

    You need to let iTunes know that they are different albums. The trick I use that work fine is to simply add the artist name of which it is the Greatest Hits in the "Album Artist".
    That way, iTunes will keep your album together.

  • Multiple Infoobject with same technical name

    Hi All,
    I have a very basic question which confuses me a lot.
    I have installed a BI content info cube 0SD_C03(Sales overview) and it is installed in Info Area -  ERP Analytics -->sales and distribution analyses. I checked the dimensions of it and 0customer( master data attr) is linked as a dimension. I created a copy of 0SD_C03 and the new Infocube name is ZSD_C03_T. It also has the same 0customer master data attr as a dimension(obviously!).
    Now both the infocubes have different technical name(0SD_C03 and ZSD_C03_T) since they will be storing different sets of data(lets say). but the technical name of the master data (0CUSTOMER) is the same for both cubes.
    ques 1: Is it since its a master data and contains the same set of master data for both the cubes, it has the same technical name?
    If I search the Info provider section for "0CUSTOMER", i get two entries: One within my info area and another within another info area. And also i can keep doing (Right click Info area--> Insert Characteristic as Infoprovider) on every other info area and insert 0CUSTOMER in every other info area.
    ques 2: does all the 0CUSTOMER in different info areas, actually contain the same set of data?
    ques 3: if i search for 0CUSTOMER in InfoObjects section, i get 5 entries in different infoareas. How can there  be diffferent Infoobject with same technical name be present in different info areas?
    Sorry if i am too elaborate, I hope i have made my questions clear.

    Hi,
    ques 1: Is it since its a master data and contains the same set of master data for both the cubes, it has the same technical name?
    A. same 0CUSTMER you can use the different places it holds same data.
        source is the 0CUST_ATTR -> target is 0CUSTOMER.
    ques 2: does all the 0CUSTOMER in different info areas, actually contain the same set of data?
    A. it will contain the same set of data.
        it has the overwrite function.
    ques 3: if i search for 0CUSTOMER in InfoObjects section, i get 5 entries in different infoareas. How can there  be diffferent Infoobject with same technical name be present in different info areas?
    A. you triggered the 5 times for specif DTP means you will 5 entries for different info areas.
    finally i will say you use the 0CUSTOMER no of places where you required and no need to create the ZCUSTOMER.
    Thanks,
    Phani.

  • Multiple volumes with the same name

    If I look at my /Volumes folder using Finder>Go>Go to Folder.. I see seven different volumes all starting with the same name:
    MyName
    MyName 1
    MyName-1
    MyName-2
    MyName-3
    MyName-4
    MyName-5
    (as well as my external drive and iMac HD)
    MyName has a folder icon, and contains 1 folder called Backup which then has my 1Password.keychain in 7 different versions.
    MyName 1 and MyName-1 are aliases and have icons for shared volumes. The only differences I can see are that in "MyName 1", the folders for Backup, Groups and Library are all displayed as aliases, whereas in "MyName-1" they are displayed as standard folders.
    MyName-2 through MyName-5 all have folder icons and are empty.
    I can understand that I could have a local and remote copy of my iDisk, hence the "MyName 1" and "MyName-1" volumes, but why all the others?
    Should I delete any of MyName-2 through -5?
    Is any of this slowing down iDisk syncing or searching?
    Thanks in advance

    I have the same problem
    an external firewire drive "232 GB" is gaining an extra, sequentially numbered, mountpoint in /Volumes/ each time it is unplugged and re-plugged.
    This is a bit of a pain as Xtorrent is downloading to a folder on this drive and so, whenever it is unplugged, I have to either;
    restart all the downloads or,
    before launching xtorrent, go into /volumes/ and delete the last mountpoint (so the system automatically adds the one Xtorrent is expecting)
    just noticed you're in Sheffield too, maybe it's a local problem....
    no idea what's causing it

Maybe you are looking for

  • 9i installation problem on Fedora 5

    Hi, I am having some difficulties when installing Oracle 9i on Fedora 5 using the article from http://ivan.kartik.sk/oracle/install_ora9_fedora.html. Specifically, it is when "switching the GCC3 compiler binary with GCC2 compiler binary as following"

  • Profit Centre updation in Vendor or Customer Line item

    Dear All, With the concept of New GL, system is configured with profit centre and business area mandatory fields. after posting the document in MIRO and VF01 system is not able to capture the Profit Centre in the vendor or customer line item in " Ent

  • Maximum nof items in FI is reached

    Hi, When we are processing post goods for outbound delivery(VL0NO) ssystem is giving error message of "maximum no of items in FI reached." plz suggest.

  • Dynamic Interactive Reports

    Hi all, Is it possible to alter the sql query of an interactive report, in a dynamic way? I want load a given query, in execution time, to an interactive report. How can i access the internal ApEx database tables? Could i write into the table respons

  • Form UIBB: Radio Button Group: How to set default value?

    Hello, i've added a Radio Button Group in Forum UIBB (FPM_FORM_UIBB) with 3 possible values. How can I set the default value for this group? When starting the application, no radio button is selected.. Thanks & Regards Christopher