Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
SetFocus on Visual Template Builder in 5.5.2
dootndo2
I am trying to setFocus() on a Visual Template Builder. When I setFocus() on init it works fine. When I setVisible(true) then setFocus() it does not work unless it redownloads the ActiveX control. Unfortunately, there is no way to make it download the control.
The way it should work:
1. The Visual Template Builder is hidden
2. Change the radio button to show the Visual Template Builder
3. When radio changed, show the Visual Template Builder
4. Set the focus on the Visual Template Builder
Sample Code
<code>
// INIT
IWDatacapture.getItem("VISUALTEMPLATEBUILDER").setVisible(false); // visual template builder
// END INIT
function RadioButtonHandler()
{
var selectItem = IWDatacapture.getItem("RADIOBUTTONS"); // radio button control
var radItems = selectItem.getOptions(); // get radio options
for (j = 0; j < radItems.length; j++)
{
if (radItems.selected == true)
{
if (radItems.text == "RADIO1")
{
// show the linked content
IWDatacapture.getItem("VISUALTEMPLATEBUILDER").setVisible(false);
IWDatacapture.getItem("TEXTBOX").setVisible(true);
IWDatacapture.redraw();
}
if (radItems.text == "RADIO2")
// if the item is selected hide radio1's respective item then show visual template builder
{
// show the linked content
IWDatacapture.getItem("VISUALTEMPLATEBUILDER").setVisible(true);
IWDatacapture.getItem("TEXTBOX").setVisible(false);
IWDatacapture.redraw();
var visualTemplate = IWDatacapture.getItem("VISUALTEMPLATEBUILDER");
visualTemplate .setFocus();
}
}
}
}
</code>
Any help in this would be appreciated.
Things I have tried:
1. I put a setFocus() after every line in the method to make sure I didn't miss it
2. Set up JS timer to pause execution (wait while the Visual Template loads)
3. Set up an event handler to fire when Visual Template Builder 'onchange' fires then wait and then setFocus()
dootndo2
Find more posts tagged with
Comments
There are no comments yet