- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-07-2016 11:06 AM
I have containers set up in an order guide and I am currently attempting to apply a UI policy to them with a delay. This function doesn't work on collapse, just for the order guides in Geneva (patch 4). Can someone with more web experience help me out here please? I see that the button element has an onclick method of toggleVariableContainer(id), and I want to get access to that in my jQuery script, so I can set it to true/false. Thank you for looking at this one and helping me out.
Here is my current jQuery script for the containers. The false script works just fine, they expand with the timeout as expected. It's the true condition that has the timeout that is not working. They just all collapse at once.
-- If TRUE --
function onCondition() { //collapse headers, Type = 'None'
// hide the Update Set 'User Info' Header by clicking the Collapse button
setTimeout(function(){
$j('#img_63c28cc34f100200da16defd0210c70c').click();
}, 600);
// hide the Update Set 'Work Address' Header by clicking the Collapse button
setTimeout(function(){
$j('#img_967563414f400200da16defd0210c76b').click();
}, 300);
// hide the Update Set 'Email Info' Header by clicking the Collapse button
$j('#img_e41a2a624f8d0200da16defd0210c77b');
}
-- If FALSE --
function onCondition() { //expand headers, Type != 'None'
// hide the Update Set 'User Info' Header by clicking the Collapse button
$j('#img_63c28cc34f100200da16defd0210c70c').click();
// hide the Update Set 'Work Address' Header by clicking the Collapse button
setTimeout(function(){
$j('#img_967563414f400200da16defd0210c76b').click();
}, 300);
// hide the Update Set 'Email Info' Header by clicking the Collapse button
setTimeout(function(){
$j('#img_e41a2a624f8d0200da16defd0210c77b').click();
}, 600);
}
Solved! Go to Solution.
- Labels:
-
User Interface (UI)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2016 11:43 PM
Instead of try to emulate a click event, just invoke the function;
toggleVariableContainter('sys_id');

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-09-2016 11:43 PM
Instead of try to emulate a click event, just invoke the function;
toggleVariableContainter('sys_id');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-10-2016 05:38 AM
Thanks Jace, I found that function in the code but didn't quite know how to implement it. After trying it in my UI policy I am finding that it's not doing anything. I have used the sys_id of the variable set. Is there a different sys_id I should be using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2016 06:24 AM
Can you help me understand where/how you found this toggleVariableContainer() function jacebenson?
I am reading through the Geneva patch 5 updates and came across a similar function and am wondering if these are listed somewhere in the product docs?
Service Catalog PRB657798 | Service Catalog Plugin | Function toggleHelp() on catalog client scripts throws JavaScript errors in Geneva | The function toggleHelp() is obsolete in Geneva, and it throws JavaScript errors on catalog client scripts. |

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2016 07:31 AM