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     [SOLVED] disabling an iframe

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] disabling an iframe
 Login/Join
 
Silver Member
posted
Hello folks,
I have two radio buttons...
1) all
2) custom

When i run the launch page... by default 'all' is selected... and when i select custon selection then iframe under it will be activated...

How can i disable the iframe when i select back the all selection and also clear the contents in the "iframe"....

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


7.7.02, sql server
Windows
all output (Excel, HTML, PDF)
 
Posts: 38 | Registered: April 26, 2010Report This Post
Expert
posted Hide Post
This sounds like a javascript question.

Can you post your web page code with the buttons, and iframe ?


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
Silver Member
posted Hide Post
Hello Waz,

I created a sample with two radio buttons and iframe.....

I wrote a sample java script function "123abc(ctrl)"

in the below i am able to disable the "button1"
but not the "iframe'..

The search button when clicked gives the results in i frame

with disabling the iframe i am also looking to clear the values in "iframe" when the radio button "radio1_0" is checked..


//HTML CODE //
<HTML>
<HEAD>
<META id=mycharsetmeta content="text/html; charset=ISO-8859-1" http-equiv=Content-Type>
<META id=Generation content="Gen 3.0">
<script id=IBI_RelCallBack type=text/javascript>function AdjustChildrenPosition(){
}
</SCRIPT>

<script id=IBI_OptionsScript type=text/javascript>
var cgipath = "cgipath";
var ibirls = "ibirls3";

var rltdyncalendar = "rltdyncalendar";
var gmap = "ibigmap";
var olap="olap";
var olappanebase="olappanebase";
var olapdrill="olapdrill";

var ibixmltree="ibixmltree";

var ibiOptions = new Array(cgipath,ibirls);
</SCRIPT>

<script id=IBI_nls type=text/javascript src="/ibi_html/javaassist/nls.js"></SCRIPT>

<script id=IBI_nlsVars type=text/javascript src="/ibi_html/javaassist/nlsvars.js"></SCRIPT>

<script id=IBI_ibigbl type=text/javascript src="/ibi_html/javaassist/ibi/html/js/ibigbl.js"></SCRIPT>

<script id=IBI_ibigblloadCss type=text/javascript>
ibigblloadCss(null);
addIntlTranslatedJS("composertrans.js");
</SCRIPT>
<TITLE>HtmlPage</TITLE>
<script id=clientEventHandlersJS type=text/javascript>
//Begin function window_onload
function window_onload() {
 
UpdateData();
 

function abc123(ctrl)
{
if(document.getElementById("radio1_0").checked==true)
{
document.getElementById("button1").disabled=true;
document.getElementById("iframe1").disabled=true;
}
else
{
document.getElementById("button1").disabled=false;
document.getElementById("iframe1").disabled=false;
}
}
// TODO: Add your event handler code here
//add onInitialUpdate() function to make changes before initial run of the reports
}
//End function window_onload
</SCRIPT>

<script for=window eventname="onload">window.onload = function() { window_onload(); }</SCRIPT>

<META name=GENERATOR content="MSHTML 8.00.6001.18928"></HEAD>
<BODY style="OVERFLOW: auto" nextelementuniquenumber="1" elementtype="21" edaconnectionrequired="false">
<SPAN style="Z-INDEX: 1; POSITION: absolute; WIDTH: 180px; HEIGHT: 40px; TOP: 70px; LEFT: 230px" id=radio1 tabIndex=1 contentEditable=false elementtype="12" persistentuniqueid="compUid_1" groupChildren="1" columns="1" name="radio1">
<TABLE style="WIDTH: 100%; HEIGHT: 100%" contentEditable=false cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD>
<LABEL style="CURSOR: default" id=radio1_LABEL_0 for=radio1_0>
<INPUT id=radio1_0 tabIndex=1 onclick=abc123[this) value=1 CHECKED type=radio displaytext="ALL" name="radio1">ALL</LABEL></TD></TR>
<TR>
<TD>
<LABEL style="CURSOR: default" id=radio1_LABEL_1 for=radio1_1>
<INPUT id=radio1_1 tabIndex=1 onclick=abc123[this) value=2 type=radio displaytext="Custon selection" name="radio1">Custon selection</LABEL></TD></TR></TBODY></TABLE></SPAN>
<iframe style="Z-INDEX: 2; POSITION: absolute; WIDTH: 860px; HEIGHT: 460px; TOP: 130px; LEFT: 230px" id=iframe1 tabIndex=2 src="" autoExecute="False" name="iframe1"></IFRAME>
<INPUT style="Z-INDEX: 3; POSITION: absolute; WIDTH: 160px; HEIGHT: 30px; TOP: 90px; LEFT: 550px" id=button1 tabIndex=3 value="view custom " type=button name="button1">      
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=layoutinfo type=hidden>
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=IBIMR_domain value=a8j1spz4/a8j1spz4.htm type=hidden name="IBIMR_domain">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=IBIMR_folder value=#qualityadhoc type=hidden name="IBIMR_folder">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibif_ex value=app/iframe.htm type=hidden name="ibif_ex">
<INPUT style="POSITION: absolute; TOP: -100px; LEFT: -100px" id=ibiapp_app value="devtestmf baseapp" type=hidden ismre="1" name="ibiapp_app">
<xml id=focus_xmlelement>
<script type="text/xml">
	
<rootxmlnode top="20" left="1088" width="150" height="130">
		
<variables></variables>
		
<input_controls>
			
<input_control bindcontrolid="compUid_1" onetimepopulated="1" name="radio1" id="radio1" multiple="0" inbinding="1">
				
<link linktype="default">
					
<condition default="1" name="Default" whattodowithcontrol="0" valuescompareoperator="0" parameterscompareoperator="0" conditionmultiselectoperator="0">
						
<data_info modifiedrequest="1">
							
<static_values>
								
<static value="1" display="ALL" selected="1"></static>
								
<static value="2" display="Custon selection" selected="0"></static></static_values></data_info></condition></link></input_control></input_controls>
		
<other_bound_objects></other_bound_objects>
		
<requests></requests></rootxmlnode></script>
</xml></BODY>
<script id=IBI_loader type=text/javascript>
doBeforeLoad();
</SCRIPT>
</HTML>


7.7.02, sql server
Windows
all output (Excel, HTML, PDF)
 
Posts: 38 | Registered: April 26, 2010Report This Post
Expert
posted Hide Post
Please post code between
[code]
[/code]
tags.


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
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Report This Post
Expert
posted Hide Post
Your sample has a an erro in it.

You need to add a } after UpdateData(); and remove the } after the comment //add onInitialUpdate

As for the Iframe, it may be easier to change its display to none.

I don't think you can disable the iFrame.

I have two suggestions

1. Use the code document.getElementById("iframe1").style.display='none'/'inline'; to hide/show the iFrame.
2. communicate to the contents of the iFrame and disable the whole form.


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
<JG>
posted
To clear the contents of an iframe

iframesrc=parent.document.getElementsByName("framename")[0];
iframesrc.src="#";  


to hide it

iframesrc=parent.document.getElementsByName("framename")[0];
iframesrc.display="none";  


to show it

iframesrc=parent.document.getElementsByName("framename")[0];
iframesrc.display="block";  


iframe must have name="framename"

Alternativly use

getElementById("frameid").  
 
Report This Post
Silver Member
posted Hide Post
Thank you...Very much.....


7.7.02, sql server
Windows
all output (Excel, HTML, PDF)
 
Posts: 38 | Registered: April 26, 2010Report 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] disabling an iframe

Copyright © 1996-2020 Information Builders