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.

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.


Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [CLOSED] Handling forms in webfocus maintain

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[CLOSED] Handling forms in webfocus maintain
 Login/Join
 
Guru
posted
Hi All,
I have a dropdown in maintain screen which populates the HTML table based on the value selected.There is a corresponding flag values for each values of dropdown in datasource.I want to make whole HTML table disabled (grey out) if flag value is 'Y' so that user can not interact it with further.If the flag value is 'N' the HTML Table will be active.How can I handle this in maintain?

Thanks in advance.

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


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
 
Posts: 281 | Location: India | Registered: April 21, 2007Report This Post
Master
posted Hide Post
If you want to entire table to disappear use this Maintain command:
Winform set Form1.HTMLTable1.Visible To 0
To make it reappear use:
Winform set Form1.HTMLTable1.Visible To 1

If you want it to appear but not active use:
Winform set Form1.HTMLTable1.Enabled To 0
To make it active use:
Winform set Form1.HTMLTable1.Enabled To 1

Where Form1 is the name of your form, and HTMLTable1 is the name of your HTMLTable.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Guru
posted Hide Post
HI Mark,
I have some links also present in the HTML Table.I also need to disable those links as those links are still working. i.e, The colors are greyed out but on clicking the links it is performing the underlying tasks.How to disable or hide those links in HTML table in maintain?Please suggest.

Thanks.


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
 
Posts: 281 | Location: India | Registered: April 21, 2007Report This Post
Guru
posted Hide Post
Hi,
I am Trying to hide those links in javascript by using below piece of code :

 
document.getElementsByTagName("tr")[i].cells[k].style.visibility = "hidden";
 


I am using this in javascript after calling maintain function in which the HTML table is disabled based on the flag value of value selected in dropdown list.But this is not working and links are still executing its underlying function.Can you suggest where I am doing wrong or any alternate way to handle this?

Thanks.


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
 
Posts: 281 | Location: India | Registered: April 21, 2007Report This Post
Virtuoso
posted Hide Post
Try
document.getElementsByTagName("tr")[i].cells[k].innerHTML.style.visibility = "hidden";


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Expert
posted Hide Post
Be aware that different browsers will handle the code in different ways.


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

 
Posts: 6347 | Location: 33°49'23.0"S, 151°11'41.0"E | Registered: October 31, 2006Report This Post
Guru
posted Hide Post
Hi,
Its still not working.I am using IE8 browser.Please suggest some way to handle this?


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
 
Posts: 281 | Location: India | Registered: April 21, 2007Report This Post
Virtuoso
posted Hide Post
Shankar

Your original code should work if you are using plain href links. Can you post an example of the table and your javascript.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report This Post
Guru
posted Hide Post
Hi Alan,


Here is the sample HTML table and code. I am using EMPDATA as datasource here.In my HTML table I have 6 columns Pin,Lastname,Firstname,Div,App,App1.Column App and App1 are having links in each row of the table.My maintain code looks like:

MAINTAIN FILE empdata

$$Declarations
Declare SelDiv / A4 ;

Case Top

Infer empdata.EMPDATA.PIN into EmpStack;


EmpStack.app/a200;
EmpStack.app1/a200;

getEmp( );

Winform Show Form1; 
-* Replace the Winform Show command with the following code
-* when to display your form in a non-persistent state
-* Winform Show_And_Exit Form1;

EndCase

Case getEmp
Reposition empdata.EMPDATA.PIN ;
Stack clear EmpStack ;
For all next empdata.EMPDATA.PIN into EmpStack() 
Where (DIV EQ SelDiv );

if SelDiv eq 'CORP' begin
Winform set Form1.HTMLTable1.Enabled To 0; 
endbegin
else Winform set Form1.HTMLTable1.Enabled To 1; 

Show( );

EndCase
 
Case Show
Declare (i/i4);


repeat EmpStack.foccount  i = 1;

Compute EmpStack(i).app = '<A href= "" target="_blank" onclick="IWCCB(event);IWC_HTMLTable1(this,0);return false;">GENERATE REPORT</A>'
endrepeat i= i+ 1;

repeat EmpStack.foccount  i = 1;

Compute EmpStack(i).app1 = '<A href= "" target="_blank" onclick="IWCCB(event);IWC_HTMLTable1(this,0);return false;">GENERATE REPORT</A>'
endrepeat i= i+ 1;

EndCase

END



I have a dropdown which contains DIV values based on which HTML table is populated.Here, Iam checking selected DIV value to enable or disable HTML table.In this sample code I have taken CORP value to disable the table.i.e If CORP is selected the whole table will be disabled else it will be enabled.
Now,When the table is in disabled condition the links should also disappear from the table which I am trying to handle in javascript below:


 
function OnComboBox1_Change ( )  {

  var oRows = document.getElementById('HTMLTable1').getElementsByTagName('tr');
  var irows = oRows.length ; 

IWCTrigger("getEmp");

for(i=1; i<=irows; i++){

document.getElementsByTagName("tr")[i].cells[5].style.visibility = "hidden";
document.getElementsByTagName("tr")[i].cells[6].style.visibility = "hidden";

}
}



I am bit confused whether this the right way to handle this or not.Please suggest.

Thanks.


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
 
Posts: 281 | Location: India | Registered: April 21, 2007Report This Post
Guru
posted Hide Post
Can anybody reply to this please?

Thanks.


WF 8.1.04,Windows 7,
DataBase: Oracle 11g,Output :Excel,PDF,HTML
 
Posts: 281 | Location: India | Registered: April 21, 2007Report This Post
Master
posted Hide Post
Ok - This can be handled like this. Use Maintain to disable the HTMLTable with:
Winform set Form1.HTMLTable1.Enabled To 0

Then change the ClickLink function to JavaScript with this code:

function OnHTMLTable1_ClickLink ( ) {
if( !(document.getElementById("HTMLTable1_mainDiv").disabled) )
{
alert("good");
}
}

Instead of just an alert you can use IWCTrigger to perform a Maintain case or anything else. This code ONLY allows the clicklink to work when the object is not disabled.

Mark
 
Posts: 663 | Location: New York | Registered: May 08, 2003Report This Post
Virtuoso
posted Hide Post
Shankar

As before, you cannot process any javascript after an IWCTrigger. The IWCTrigger is a form submit function and any js after that will be ignored.


Alan.
WF 7.705/8.007
 
Posts: 1451 | Location: Portugal | Registered: February 07, 2007Report 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     [CLOSED] Handling forms in webfocus maintain

Copyright © 1996-2020 Information Builders