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     Can the location of Popup Calendar be Controlled

Read-Only Read-Only Topic
Go
Search
Notify
Tools
Can the location of Popup Calendar be Controlled
 Login/Join
 
Member
posted
I am wondering if we can control where the popup calendar on a calendar control appears on the screen. We have a pair of controls and when you click for the calendar it appears below and one must scroll down to see it.

I assume it's position is being set relative to the control in CSS or javaScript. Can we affect this in any way?

Thanks


WebFOCUS 7.1.3 and 7.6.1 (in migration)
Windows Server 2003 R2
Output: HTML, Excel, PDF
 
Posts: 3 | Registered: September 28, 2007Report This Post
Virtuoso
posted Hide Post
What version? What browser. We find the calendar stays linked to the right of the calendar box in IE, but it floats in Firefox. If anyone has a solution would be nice.

Before some one else asks you, please update your profile to show the version in the signature.

Thanks.


Leah
 
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004Report This Post
Silver Member
posted Hide Post
I had to deal with something similar in one of my programs. I could not find an easy way to do that but a work around achieved almost the same result. Using this work around you can display your calendar at a certain location (IE6+ only…it has not been tested for any other browser).

In order for us to display an object at certain location we would need to get the available height and width of the browser. We could use something like this to get that info.
var scr_w = screen.availWidth;
var scr_h = screen.availHeight;

Only problem is that result will not be consistent and depending upon the size of window (if resized) object may display at different location. Work around would be to resize the window to a known size using something like this:

function reSizeWin(){

//var scr_w = screen.availWidth;
//var scr_h = screen.availHeight;
var scr_w = 875;
var scr_h = 655;
var myWidth, myHeight;

   if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }

if (scr_w != myWidth || scr_h != myHeight) {
   window.resizeTo(scr_w, scr_h);
   window.moveTo(0, 0);
}
}


Once you have it resized, you can use that info in your call to the calendar object. In my case it was something like this:
function cal_popup2 (str_datetime) {
	     
	if (str_datetime) {
		this.dt_current = this.prs_tsmp(str_datetime);
	}
	else {
		this.dt_current = this.prs_tsmp(this.target.value);
		this.dt_selected = this.dt_current;
	}
	if (!this.dt_current) return;
	
		
/*get the position of the object, on page, where you want calendar window to be displayed*/  
var myid1 = document.getElementById('calenImg2');
var elem1 = GetElementPosition(myid1);

/*set an offset value (depending upon where the object is located)*/
var offsetL=23
var newL=elem1.x+offsetL

 
	var obj_calwindow = window.open(
		'http://ServerName/ibi_html/htm_files/calendar.htm?datetime=' + this.dt_current.valueOf()+ '&id=' + this.id,
		'Calendar', 'width=200,height='+(this.time_comp ? 215 : 190)+
		',status=no,resizable=no,left='+newL+',top='+elem1.y+',dependent=yes,alwaysRaised=yes');
	obj_calwindow.opener = window;
	obj_calwindow.focus();
}



I hope this makes sense to you. It may or may not work in your situation but at least it worth a shot.


Prod: WebFOCUS 7.1.3 on Linux Kernel-2.6.5 zSeries 64bit/Apache Tomcat/5.0.28 JAVA version 1.4.2_11 server
 
Posts: 35 | Location: Oklahoma City | Registered: May 11, 2006Report 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     Can the location of Popup Calendar be Controlled

Copyright © 1996-2020 Information Builders