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     calendar control problem

Read-Only Read-Only Topic
Go
Search
Notify
Tools
calendar control problem
 Login/Join
 
Platinum Member
posted
hi ppl,
i am new to webfocus and i like to thank all the forum members, gurus , virtuosos for patiently answerin my questions..
i am facing a very weird problem.. i am using 2 Forms in my report ...The second form is the user input screen where the business user can dynamically select the columns he wants to see on the report.This is done by placing checkboxes in front of the column names.. WE have 3 filters in the form of list boxes in form2.Then we have a date filter option..

This is of the form
From date ( then textbox with calendar) To date ( then textbox with calendar)..

When i run the report everything comes perfectly..Except for the fact that the calendar icon attached to the textbox also appears in form1 ..i am not able to hide the calendar icon in form1..its supposed to get displayed only in form2...
i have used the following code..it doesnt work...
please advice

<script language='javascript'>
//get all images on the page into array
var images=document.getElementsByTagName("img");
//get the number of images in array
var numImages = images.length;
//Loop through images and see if it is a dynCalendar
for (i=0;i if (images[i].src.indexOf("dynCalendar.gif")>0){
//If it is, hide
images[i].style.visibility='hidden';
}
}
<\/script>


WebFOCUS 714
Windows XP
Output: HTML,PDF,Excel
 
Posts: 189 | Registered: January 30, 2008Report This Post
Expert
posted Hide Post
Nothing to do with WebFOCUS per se, but purely HTML/JavaScript. So how are your skills in HTML and JS?

What's with the forward and backward slash in the script closing tag? Typo or do you have that in your code?
Try putting alerts in to show what values are attributed to the variables within your JS whilst it executes.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Platinum Member
posted Hide Post
tony,

The calendar control option is Webfocus inbuilt i guess .. Because there is no default calendar option in JS as far as i know ...Whenever i insert calendar control It attaches itself to the right of a textbox..
I am a begineer in JS..
do u have ne sugestions


WebFOCUS 714
Windows XP
Output: HTML,PDF,Excel
 
Posts: 189 | Registered: January 30, 2008Report This Post
Virtuoso
posted Hide Post
Arvind,

Yes, the calendar control is a built-in webfocus feature.
Don't really know why you would want the images to be hidden, but who am I to question this desire.
Anyway, it all depends on where you put this piece of javascript code.
If you put it in the head of the document, before body that is, then indeed it will not work. The reason for that is that the calendar controls are being put on the page at the very end of the document. If you put your code after that, but before the html end tag, then it will work (at least, it did for me...).

Hope this helps ...


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
hi gamp,
i tried it ..but dint work for me..the sad part is i am not able to communicate the problem i am facing..
ok i will try it once again....
i have two forms in my HTML CODE

Form 1 contains
1) frame where default report is displayed...
2) edit layout button at the top left corner
3) export to PDF, Excel icons at the top right corner

User goes to form 2 after clicking the edit-layout button ..
Form 2 is the user input page

1) Contains the column names in the report with checkboxes .. so that user can dynamically select the columns he wants in the report..

2) 3 filters in the form of listboxes..

3) fourth filer is the date filter if the user wants to see the data between a particular date range..

4) this is achieved using the calendar option..
It is of the form.. From Date (Calendar icon) To date ( Calendar Icon)...

5) The problem i am facing is the calendar icon must appear only in form 2 ..But it appears in form 1 also..which looks weird..i am not able to hide the calendar icon in form 1...

6) run-report button

Did u get my problem?? please advice

Thank you for ur help..


WebFOCUS 714
Windows XP
Output: HTML,PDF,Excel
 
Posts: 189 | Registered: January 30, 2008Report This Post
Expert
posted Hide Post
Arvind,

The calendar control may be "a built-in WebFOCUS feature" but it is entirely HTML and JavaScript in essence so to understand how it interacts with your web page you will require a basic understanding of these. For the calendar to appear on your initial form there must be an HTML control contained within your code for the calendar. If it's there, then delete it.

If you are using a single HTML page for your interface then that might explain your problem. Try surrounding the control tags with DIV tags with CSS for a display attribute. Set it to "none" on the first form and then set it to "block" when you display form 2.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Platinum Member
posted Hide Post
hi tony ,

below is the calendar JS code generated by webfocus when i insert calendar in the report.... and as you said i have used DIV tags and used this code under the form name = form2 TAG..this works for other things like listbox..( Listbox gets displayed only in form2 and not form1)..but there is some sort of discrepancy when it comes to Calendar ..

//script language=javascript>
//INPUT id=calendar1 style="Z-INDEX: 27; LEFT: 560px; POSITION: absolute; TOP: 116px" tabIndex=27 hspace=0 accept=0 name=ASFD ibiformat="YYMD" sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="1692730" datasource displayfield datafield operation="NONE" addalloption="0" labelid="ITEM7" elementtype="14" calendardata="0/0/-10;0/0/10" calendardatatype="1"
//INPUT id=calendar2 style="Z-INDEX: 29; LEFT: 770px; POSITION: absolute; TOP: 116px" tabIndex=29 hspace=0 accept=0 name=ASTD ibiformat="YYMD" sourcetype="typeMaster" datafieldtype="CHAR" datatype="0" requiredfield="1692730" datasource displayfield datafield operation="NONE" addalloption="0" labelid="ITEM8" elementtype="14" calendardata="0/0/-10;0/0/10" calendardatatype="1"
//

please advice
thank you very much sir


WebFOCUS 714
Windows XP
Output: HTML,PDF,Excel
 
Posts: 189 | Registered: January 30, 2008Report This Post
Expert
posted Hide Post
Arvind,

If you want to know what the problem is then do what most other folks would do, look at how the code is executed and follow the processing backwards or forwards to understand it.

Look in your resultant HTML file and you will find a javascript function call that deals with creating the calendar control(s). This calls a javascript function within standard IBI includes. To give you a start, the called functions normally exist in a file named "ibirls2.js". Locate this file (you'll find the reference in the executed HTML code). Locate the function within this file and work on it.

Yes, folks on this forum could tell you exactly what code is called but they are not being paid for the job you are meant to be able to do. Now this may or may not be your fault, either because you haven't had training to do the job you are asked to do or you don't have the support within your company. Either way you need to learn a bit more than you know already.

I don't know what company you work for, but I'll hazard a guess that it's one that outsources support / development for another company. One of the problems with outsourcing is that the outsourcing companies often do not train their staff adequately so their untrained staff latch onto Forums such as this one and ask for help. If folks realise the inferred statement, then they will understand this comment.

"I think it would be advisable to ensure that new members have had a basic training course supplied, or endorsed by IB before they are permitted to post a question on the forum."

This might ensure that undertrained folks are given training to support their work requirements instead of leaching free support?

My soapbox is getting worn out Frowner

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Good one Tony

quote:

"I think it would be advisable to ensure that new members have had a basic training course supplied, or endorsed by IB before they are permitted to post a question on the forum."




Frank

prod: WF 7.6.10 platform Windows,
databases: msSQL2000, msSQL2005, RMS, Oracle, Sybase,IE7
test: WF 7.6.10 on the same platform and databases,IE7

 
Posts: 2387 | Location: Amsterdam, the Netherlands | Registered: December 03, 2006Report This Post
Platinum Member
posted Hide Post
TONY,
thanks for your advice..i understand your situation..i know it is really difficult to answer loads of questions in this forum..But you must also understand my predicament ..Webfocus is a relatively new tool in my company..and there are no senior resources to help me out..plus there is no vendor training provided..I ask my doubts and questions only after working on the problems i face and not getting any answers..
Anyway i thank all the forum members for answering my questions.
I appreciate it ..


WebFOCUS 714
Windows XP
Output: HTML,PDF,Excel
 
Posts: 189 | Registered: January 30, 2008Report This Post
Expert
posted Hide Post
Arvind,

Please do not take my above "generalised" comments as a personal sleight, there are plenty of folks on the forum that do as you intimate, and work their problem through as far as they can first. However, there are also quite a few who give every indication that they have not.

"Senior resources" can always be bought in, either from Information Builders or Freelance agents with the skills that your company needs. It is often the case that skilled resources are brought into a company to bolster the lack of experience, until the permanent staff are sufficiently skilled so as not to require addition resource.

As for vendor training, you only need to (should?) get your managers to approach IB and I am sure that IB will be able to identify some training that is suitable and available for you and your company. As I have said many times before, the lack of training issue is primarily the responsibility of the company that employs. This, however, does not absolve the individual from requesting that training!

Having said all that, your current question is not truly WebFOCUS based even though the control is "inbuilt", so WF training might not help you in this situation. Hence my original reply "How are your skills in HTML and JS?". To identify a way forward for yourself you need to look towards the JavaScript modules, and in particular the functions setDateRange(); and setupDocCalendars();. Work your way through these pieces of code and try and understand how they interact with the HTML tag attributes that your GUI actions have created. Then you may be in a position to identify how your specific problems can be resolved.

Some Forum based pieces of advice.
* When you want to post code within a forum post, click on the < / > icon. Insertion of your code in this manner will ensure that the "eve" BB engine displays it OK.
* Place your platform and release information into your profile ("go"/"Personal Zone"/"Profile" above left), click on "View/Edit Complete Profile" and then add the details into the "Signature" section. Then you do not have to remember to enter it each time Smiler

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Virtuoso
posted Hide Post
Arvind,

Again I tested your supplied code, but now with two forms, and a calendar object in each of them. Your code just simply works for me.

Your explanation however does not mention that there is a calendar control in your first form. So I think that what you are basicly asking is why this calendar control icon appears in the first form, while you did not specify any control for the first form. Correct?
If so, then there are two things you can do. The first thing is as Tony suggests: trace down the js code to find out what happens. Second thing, only when the first does not give you the solution, is: post your html-code here and see if the forum members can make sense of it.
If you do post code, be sure to enclose it in the code tags ([ code] and [ /code], without the spaces).


GamP

- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
 
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007Report This Post
Platinum Member
posted Hide Post
GAMp,
Thank you very much sir..i will first go through the DYNCALENDAR JS File and see whether i can make any changes there or not..

thank you


WebFOCUS 714
Windows XP
Output: HTML,PDF,Excel
 
Posts: 189 | Registered: January 30, 2008Report This Post
Expert
posted Hide Post
Arvind,

If you are planning on changing the JS as you imply, be aware that on upgrade your changes will be overwritten, so take backups and document your changes so that you can apply then each time you upgrade.

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report This Post
Platinum Member
posted Hide Post
tony,
problem solved phewwww Smiler
 
<script language='javascript'>
//get all images on the page into array
var images=document.getElementsByTagName("img");
//get the number of images in array
var numImages = images.length;
//Loop through images and see if it is a dynCalendar
for (i=0;i if (images[i].src.indexOf("dynCalendar.gif")>0){
//If it is, hide
images[i].style.visibility='hidden';
}
}
<\/script>
 


i used the code in the onclick function of the buttons provided in the report and i have set the visibility to be hidden and visible accordingly so that i am able to hide the calendar icon in one form and display it in another...

thank you sir


WebFOCUS 714
Windows XP
Output: HTML,PDF,Excel
 
Posts: 189 | Registered: January 30, 2008Report This Post
Expert
posted Hide Post
Arvind,

You need not thank anyone but yourself. Giving you pointers and getting you to look and learn has helped you locate, understand and remedy the problem. No doubt you have learned something new in this exercise. That is what I feel is the best way to help people.

Well done!

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004Report 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     calendar control problem

Copyright © 1996-2020 Information Builders