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.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
Dear All- There is an EDIT BOX on a html launch page that we default with text 'Select State'. There is no label to identify the box, the default text identifies the box for us.
The user can edit their entry and change New York to New Mexico.
Clicking on the 'x' to the right and inside the edit box **clears** the edit box. We can deal with that. The blank box doesn't look finished. We want to change that behavior. When the user clicks on the 'x', we want the box to be reset to the default text 'Select State'.
How do we go about this?
Thanks to All who noodled over this.This message has been edited. Last edited by: WF8Developer,
Originally posted by WF8Developer: Dear All- There is an EDIT BOX on a html launch page that we default with text 'Select State'. There is no label to identify the box, the default text identifies the box for us.
The user can edit their entry and change New York to New Mexico.
Clicking on the 'x' to the right and inside the edit box **clears** the edit box. We can deal with that. The blank box doesn't look finished. We want to change that behavior. When the user clicks on the 'x', we want the box to be reset to the default text 'Select State'.
How do we go about this?
Thanks to All who noodled over this.
I don't know where this 'x' comes from... when I create an edit box, there is no 'x'. I am using App Studio.
In any case, here is an example with a push button instead of an 'x':
function edit1_ononafterload(ctrl) {
var s = document.getElementById("edit1");
s.value = "Select State";
}
function button1_onclick(event) {
var s = document.getElementById("edit1");
s.value = "Select State";
}
The edit box is "edit1", and the push button is "button1". After the edit box is drawn on screen the "on after load" function will default it to "Select State". When the push button is clicked, the same thing will happen.
If the 'x' has a click event, use the code in the push button "onclick" function for that event.
App Studio WebFOCUS 8.1.05M Windows, All Outputs
Posts: 594 | Location: Michigan | Registered: September 04, 2015
I simplified the question a bit.. Usually, the data isn't a state but a string of 10-16 unrelated characters that looks like your car VIN. We are attempting to help the user by allowing him/her to edit a single character rather than completely starting over.
In WebFOCUS the edit box will have a 'X' at far right to where the data was entered. That empties/deleted/clears out the contents of the edit box.
We would like: A)To allow the user edit previous entered data. B)When user clicks on the 'x', the box is reloaded with 'Select State' or 'Select VIN' and not become blank.
The crux of the problem is knowing what that reset function is named (whether it an 'x' or a image). You press on it like a button but it doesn't have a Unique Identifier or a Name. How do you identify it and what properties can be assigned?This message has been edited. Last edited by: WF8Developer,
Originally posted by WF8Developer: Squatch-Thanks.
I simplified the question a bit.. Usually, the data isn't a state but a string of 10-16 unrelated characters that looks like your car VIN. We are attempting to help the user by allowing him/her to edit a single character rather than completely starting over.
In WebFOCUS the edit box will have a 'X' at far right to where the data was entered. That empties/deleted/clears out the contents of the edit box.
We would like: A)To allow the user edit previous entered data. B)When user clicks on the 'x', the box is reloaded with 'Select State' or 'Select VIN' and not become blank.
The crux of the problem is knowing what that reset function is named (whether it an 'x' or a image). You press on it like a button but it doesn't have a Unique Identifier or a Name. How do you identify it and what properties can be assigned?
Okay, I only use App Studio, and there is a "Reset" component available. It looks like it's just a button that defaults to a name of "Reset".
I dropped one of those next to the edit box, then went to "Tasks & Animations". I created a new task, set the trigger type to "Click", then selected the Reset button (ID is "reset1"). For Requests/Actions I chose "Refresh", selected a target type of "Input Control" with the target being the edit box ("edit1").
So now when I hit that Reset button, the default text for the edit box comes back (Which for me is "Select State"). It looks like you don't need the JavaScript code I wrote if you do it this way.
I dropped an image onto my HTML page, and I was able to create a refresh task for the image as well.
If you don't use App Studio, I don't know what the equivalent would be for you.
(P.S. I also went into "Settings" for the edit box and created a Static data type with a Display of "Select State" and Value of "Select State". I also checked the "Selected" box for this Static value. It looks like the refresh task is going there to get the "Select State" default text.)This message has been edited. Last edited by: Squatch,
App Studio WebFOCUS 8.1.05M Windows, All Outputs
Posts: 594 | Location: Michigan | Registered: September 04, 2015
Originally posted by WF8Developer: The crux of the problem is knowing what that reset function is named (whether it an 'x' or a image). You press on it like a button but it doesn't have a Unique Identifier or a Name. How do you identify it and what properties can be assigned?
I would assume that there is a property for the edit box that allows you to hide that 'x' or image. Just a guess.
App Studio WebFOCUS 8.1.05M Windows, All Outputs
Posts: 594 | Location: Michigan | Registered: September 04, 2015
Originally posted by WF8Developer: B)When user clicks on the 'x', the box is reloaded with 'Select State' or 'Select VIN' and not become blank.
I suppose there is nothing to prevent you from overlaying an image on top of that 'x'. That way the user could not click on it, and would have to click on the replacement image instead.
Sneaky, but it could work...
App Studio WebFOCUS 8.1.05M Windows, All Outputs
Posts: 594 | Location: Michigan | Registered: September 04, 2015