Focal Point
[SOLVED] Show/Hide a Textbox in HTML

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

May 31, 2014, 08:40 AM
MMcDonald
[SOLVED] Show/Hide a Textbox in HTML
is there a way when a button-1 is clicked I can show a text box and when button-2 is clicked I can hide the text box in html painter?
Thanks

This message has been edited. Last edited by: <Kathryn Henning>,


8.0.9, Windows
excel / pdf
June 02, 2014, 01:36 AM
Rifaz
Is this what you expected?

function window_onload() {

UpdateData();

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

//Begin function button1_onclick
function button1_onclick(ctrl) {
alert ("button1 clicked");
document.getElementById('edit1').style.visibility = 'hidden';
}
function button2_onclick(ctrl) {
alert ("button2clicked");
document.getElementById('edit1').style.visibility = 'visible';
}
 

.
.
.
INPUT style="Z-INDEX: 1; POSITION: absolute; WIDTH: 140px; HEIGHT: 60px; TOP: 290px; LEFT: 230px" id=button1 language=javascript tabIndex=1 onclick=button1_onclick(this); value=Button type=button persistentuniqueid="compUid_2" defaultselection="1" name="button1"> 
<INPUT style="Z-INDEX: 2; POSITION: absolute; WIDTH: 150px; HEIGHT: 60px; TOP: 290px; LEFT: 420px" id=button2 language=javascript tabIndex=2 onclick=button2_onclick(this); value=Button type=button persistentuniqueid="compUid_3" defaultselection="1" name="button2"> 



-Rifaz

WebFOCUS 7.7.x and 8.x
June 02, 2014, 07:30 AM
MattC
IBI would prefer that you use their functions


 
function button1_onclick(ctrl) {

      IbComposer_showHtmlElement('textbox', false);    

     }

 



WebFOCUS 8.1.05
June 02, 2014, 11:37 AM
Francis Mariani
Unfortunately, there are no "API" commands in WF v7.6.

This is the only mention of JavaScript in the v7.6.9 doc:

quote:
Using JavaScript Code With HTML Composer Pages

Although the HTML Composer is fully integrated with JavaScript, it is suggested that you do
not create custom JavaScript that manipulates the HTML Composer generated controls, as
WebFOCUS cannot support such custom JavaScript code. Additionally, there is no guarantee
that the JavaScript code will work correctly in future releases.



Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
June 11, 2014, 08:19 AM
MMcDonald
Thanks Rifaz - your solution worked perfectly..!!!


8.0.9, Windows
excel / pdf