Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at myibi@ibi.com and provide your corporate email address, company, and name.


Connect to myibi
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Clear Checkbox Control

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Clear Checkbox Control
 Login/Join
 
Member
posted
I have an html page, created using HTML canvas, that contains text areas, check boxes, and a submit button. I have one on click task associated with the submit button that runs a fex and refreshes the texts areas and check boxes. I cannot figure out how to get the refresh action to work for the check boxes when they follow a request to run fex file in the action list. The text areas refresh fine, and the check boxes will refresh if I remove the request to run the fex file. Is there anything I can do to make this work?

This message has been edited. Last edited by: jltz83od,


WebFOCUS 8.2.06, Windows
 
Posts: 22 | Registered: July 18, 2019Report This Post
Virtuoso
posted Hide Post
When you say "refresh the check boxes", what action/result do you expect to have ?


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
 
Posts: 2410 | Location: Montreal Area, Qc, CA | Registered: September 25, 2013Report This Post
Member
posted Hide Post
Empty check boxes.


WebFOCUS 8.2.06, Windows
 
Posts: 22 | Registered: July 18, 2019Report This Post
Master
posted Hide Post
In the onclick event add in the following:
  
document.querySelectorAll('input[type="checkbox"]').forEach(el=>el.checked = false)


Hallway

 
Prod: 8202M1
Test: 8202M4
Repository:
 
OS:
 
Outputs:
 
 
 
 
 
Posts: 608 | Location: Salt Lake City, UT, USA | Registered: November 18, 2015Report This Post
Member
posted Hide Post
The onclick event works to clear the checkboxes; but, it clears them before the parameters are passed to the procedure. I can can make it work with two buttons, but thought for sure there would be a way to order tasks so that the same button could first pass the parameters and run the procedure, and then clear values from the check boxes. Setting the Refresh action on the text area input controls in the Tasks & Animations utility does this. I've explored the Properties for my submit button, but have not yet been able to figure out how to make it work.


WebFOCUS 8.2.06, Windows
 
Posts: 22 | Registered: July 18, 2019Report This Post
Guru
posted Hide Post
quote:
document.querySelectorAll('input[type="checkbox"]').forEach(el=>el.checked = false)

You can create a new function to clearCheckBoxes with this one line and add it to your task as last action. Or you could do it all as one JS function by running the report using IBcomposer_triggerExecute followed by this clearAll jquery script.


-********************
Sandbox: 8206.10
Dev: 8201M
Prod:8009
-********************
 
Posts: 289 | Location: Houston,TX | Registered: June 11, 2004Report This Post
Member
posted Hide Post
Wow. I really thought that I had tried that. I guess not. Thank you!


WebFOCUS 8.2.06, Windows
 
Posts: 22 | Registered: July 18, 2019Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Clear Checkbox Control

Copyright © 1996-2020 Information Builders