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);

Similar Messages

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

  • [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!

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

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

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

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

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

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

  • Problem with File Sharing-Permissions throughout Folders

    I'm having an odd problem when setting up a Mac Pro with File Sharing. I have a second Hard Drive in it which is a Server Drive to be shared as a networked Hard Drive for both my MBP and my Fiancee's MBP. Here is the problem I have.
    I set up File Sharing and set up both her ID and my ID. Since this is done she is able to get to drive from my MBP and she is able to get to the drive from her MBP. I am able to read or write to those folders. She is able to view them but is unable to write to them.
    I went to the Server Drive icon on the Mac Pro's Desktop. When I right click and do "Get Info" and select Sharing I can tell her ID is not listed on any of the Folders. She is listed as Read and Write for the entire Hard Drive (which is an internal drive). I am also listed as Read and WRite and then it lists Everyone and says No Access. The same is listed in System Preferences in File Sharing. I have heard this Everyone 'No Access' can cause problems but I prefer not to give access to everyone. The only other option is Read Only and Read and Write. Also, when I have Everyone selected the - sign is greyed out so I'm unable to remove Everyone.
    To continue, what is strange is I thought with it saying on the Server Drive itself for my Fiancee, read & write, that it would say this on every Folder inside. Yet when I select any Folder inside on the Server Drive and select Get Info it says for me "Read & Write" and for Staff "Read Only" and for Everyone "Read only" I'm not even sure where Staff comes fro and of course Everyone is Read Only and my Fiancee not even listed. It just seems that these file sharing permissions are not replicated througout all the Folders when I select it for the Hard Drive itself. What could be causing this and how can I get the same to go throughout the Folders? I know manually I could change them all but this would take a long time and likely still be a problem when any additional Folders are added.

    1. I have turned logged into it from my MBP while at Home and if I'm logged in as Guest I only see the Server Drive which is good. My concern is that if I log in with my login I then sell all Folders including the Main 'Macintosh HD' At least as a guest I can only see the Server Drive but is it any way I can stop it from showing all the other folders on the computer since I have no reason to do that?
    When you login to a mac as an administrator it is normal to see all the contents of the volumes connected to that mac.
    2. Also, I would like to disable all access for Guest. Yet I have it list Everyone or Guest in the file sharing and I have no way of deleting this. I don't want a Guest to be able to connect to this computer or share any files at all on it. Is there any way to disable this?
    Goto system preferernces-->accounts
    click on the lock to and enter your password to unlock the preference pane.
    Then select the guest account. Then uncheck the 2 check boxes. The account should now have 'disabled' underneath it.
    3. Security: How secure is this? I am using it on a Home Wi-Fi network with an Airport Base Station 1GB. I have the Leopard filewall set to "Set Access for Specific Services" since it won't work with "Allow only essential services" I hope my home network is more security but with Back to my Mac how hard would it be for someone to be able to find this computer on the network? I don't do any filesharing on my MBP but do have it set up for File Sharing but only with my login ID.
    If you have your base station set to distribute ip addresses then it is acting as a NAT router and will firewall you.
    I have not setup back to my mac yet so can't comment on its security. Although I would suggest a strong password.
    have a read of Mac OS X 10.5: About Back to My Mac security
    My method of remote access is to use SSH and run screen sharing over an SSH tunnel.

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

  • Why do I see multiple users with the same name as an output of "users"

    Recently, I found a peculiar thing when I typed "users" in the terminal. There were three users with the same name. After restart(power went down) I now see only one user there. Is this normal and why it can be happening? Why are there duplicate users sometimes?

    alphaniner wrote:
    Well now I'm confused. My xterm (xfce4-terminal) has that option disabled but I still get a user entry for each tab.
    OT: you can run who to get a better idea of what each user is associated with. Eg. with Xorg on tty1 and terminal open with two tabs:
    $ who
    testing tty1 2013-12-11 08:55
    testing pts/0 2013-12-11 08:55 (:0.0)
    testing pts/1 2013-12-11 15:51 (:0.0)
    Oh there is another option on mine besides "Run command as a login shell" called "Update login records when command is launched" I have them both disabled. Check for a second option maybe.

Maybe you are looking for

  • MONTH and YEAR functions.  Please help...

    Can anyone tell me why the YEAR and MONTH functions will only accept the format dd-MMM-yyyy (ex. 01-JAN-2009) The calendar prompt will only retun the format dd/mm/yyy (ex. 01/01/2009). This renders the calender pretty useless. I am really in need of

  • 4 audio channel from FCP to miniDV

    Hi There I have to print a tape from FCP with 4 audio channel but don't know how to do it. Does anyone know? Thank you.

  • Strange behavior of Windows Azure Compute Emulator (SDK 2.3)

    Today, after an update of the Azure SDK from 2.2 to 2.3, I noticed that only one of the two instances of my web role is started in the Azure Compute Emulator, the output of the Start-AzureEmulator is this: VERBOSE: Starting Emulator... VERBOSE: Role

  • Increasing db level???

    when i bounce a song and burn a cd the volume is much lower than a normal cd. is there a way to increase db level without mastering? i have my output track set at 0 with a limiter on it. thanks

  • WRV54G VPN user accounts setup.

    NOTE: After adding the very first user account and the router detects that it is currently configured to the default 192.168.1.0 network, it will automatically attempt to change itself to be on a 10.x.x.0 network instead. The network numbering will b