Focal Point
[SOLVED] Auto Refresh Selection Box

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8587054986

March 01, 2018, 09:26 AM
Jveselka
[SOLVED] Auto Refresh Selection Box
App Studio 8105m

Starting a new post because original was closed

I have built an HTML screen in App Studio and I am using TABS to allow the user to jump from page to page. There are three tabs on allows them to input information, update that information and delete the information if need be. TAB1 (Add New Driver) TAB2 (Update Driver Information) TAB3 (Delete Driver)

The update/delete tabs have selection boxes which allows them to select the driver they want to update/delete and then use edit boxes to update/delete the information selected.

Problem: When they Add a new driver on the first tab and switch to second tab to update, the selection boxes do not show the newly added driver until they click a refresh button. I want those boxes to auto refresh each time a tab is selected..

So if they go from the Add Tab to the Delete Tab the selection boxes (Same as Update screen) should auto refresh to show new driver. If they delete that driver and go back to the update Tab the boxes should auto refresh to remove that driver from selection boxes. Clear as mud?

I think this can be done with java script, I am just not sure how to code it or where to put it under the Embedded Java/CSS tab at the bottom of the composer screen.


Thanks
JV

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8105m
Windows, All Outputs
March 01, 2018, 09:28 AM
Jveselka
Last post that I didn't get to reply to. OOO for awhile.

vaayu
Platinum Member

posted February 22, 2018 10:32 PM Hide Post

Obviously there could be more ways but, I would refresh the control as you click the tab, theres a trigger type to refresh-->input control, see if it works.

Pawan Vuppala
WebFOCUS Developer
-********************
Wintel
WebFOCUS AppStudio 8.2x/8.1x


WebFOCUS 8105m
Windows, All Outputs
March 01, 2018, 09:30 AM
Jveselka
I see the trigger for refresh but I don't see how to select the TAB so that I can set that to refresh the input control when it is clicked. When I select the tab and create new task I only see windowPanel1. If I set that to trigger refresh it tries to refresh the screen anytime I click on the screen.


WebFOCUS 8105m
Windows, All Outputs
March 01, 2018, 11:23 AM
Jveselka
I also need to know how to refresh edit boxes when a button is pushed.

Add Driver button adds driver to focus table

User has 8 edit boxes to enter information.
FNAME LNAME ADDRESS ....

When they enter the driver information and click Add Driver I want it to add the driver and clear the edit boxes so they can enter the next driver without having to type over what is there.

Add Driver button has Trigger Type Click
Requests/Action set to run procedure and I added a Refresh for input controls edit1, edit2, and so on but it does not work. It runs the procedure but does not clear edit boxes.

What am I missing here.

Thanks
JV


WebFOCUS 8105m
Windows, All Outputs
March 06, 2018, 11:53 AM
FP Mod Chuck
Hi Jveselka

Since no one was able to provide any suggestions I think you should open a case with techsupport.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
March 07, 2018, 10:00 PM
vaayu
You could add a reset button and hide the visbility and when you click Add Driver button call this reset.click(); in your task after you execute the request.


quote:
Originally posted by Jveselka:
I also need to know how to refresh edit boxes when a button is pushed.

Add Driver button adds driver to focus table

User has 8 edit boxes to enter information.
FNAME LNAME ADDRESS ....

When they enter the driver information and click Add Driver I want it to add the driver and clear the edit boxes so they can enter the next driver without having to type over what is there.

Add Driver button has Trigger Type Click
Requests/Action set to run procedure and I added a Refresh for input controls edit1, edit2, and so on but it does not work. It runs the procedure but does not clear edit boxes.

What am I missing here.

Thanks
JV

March 08, 2018, 01:47 PM
Jveselka
Vaayu, thanks.

Can you show me how to code this? Below is what I came up with and it works but it resets my boxes before the report runs causing it to auto prompt. I don't want it to reset all the boxes just most of them.

 
if(typeof(bRuntime) != 'undefined') {
// TODO: Add your inline runtime code here
}


//Begin function window_onload
function window_onload() {






UpdateData();


$('#submit3').click(function(){
     reset2.click();
});




// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload
 



WebFOCUS 8105m
Windows, All Outputs
March 12, 2018, 04:47 PM
Jveselka
Meeting with IBI on this tomorrow. I will post the solution when we come up with one.


WebFOCUS 8105m
Windows, All Outputs
March 13, 2018, 04:39 PM
Jveselka
Here is the code Jessica Chen with IBI added to fix the issue. BTW, Jessica Rocks! If you get a chance to work with her you will not regret it.

We pointed the Add Driver Info button to foo

   
function foo(){


document.getElementById('edit2').value = "";
document.getElementById('edit3').value = "";
document.getElementById('edit5').value = "";
document.getElementById('edit4').value = "";


document.getElementById('edit6').value = "";
document.getElementById('calendar1').value = "";
document.getElementById('edit7').selectedIndex = 0;


document.getElementById('reset3').click();
}


I added this code to refresh selection boxes after they click Delete Driver Info.

Pointed Delete Driver Info button to foo1
   
function foo1(){
document.getElementById('reset4').click();
}



WebFOCUS 8105m
Windows, All Outputs