Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Hide the Calendar Text Box AND Calendar Icon
Go
New
Search
Notify
Tools
Reply
  
[SOLVED] Hide the Calendar Text Box AND Calendar Icon
 Login/Join
 
Expert
posted
Please download the code from here (* See note below) and run it in WebFOCUS to see that it does not hide the calendar icon along with the calendar text box. I need it to hide both when the function executes.

Here's some snippets from the above mentioned code
//Begin function HideCalendar_onclick
function HideCalendar_onclick(ctrl) {
document.getElementById("calendar1").style.visibility = "hidden";
}
//End function HideCalendar_onclick

...

<INPUT id=radio1_3 tabIndex=3 onclick=HideCalendar_onclick(this) value="Hide Calendar"...


So, can someone show me how to hide the calendar icon along with the calendar text box?

NOTE: "Save target as" then run it in WebFOCUS, otherwise you won't see what I mean (no calendar icon is displayed unless it's run in WebFOCUS)

Thanks in advance,
Doug

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


   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Most recent: 8204 Gen 48 in Test and Production.
   Currently Available. Please contact me.
 
Posts: 3040 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Doug,

Here is some JS that I have used to do exactly this before. Note that it hits every calendar control and not a single one, but it should give you the idea on how to achieve what you need.

T

function RemoveCalIcons() {
// Well, not actually remove them, just empty the inner HTML code so they don't get displayed :)
  objCal = document.getElementsByTagName("INPUT");
  for (i=0;i<objCal.length;i++) {
    objCalicon = document.getElementById(objCal[i].name+"_img");
    if (objCalicon) {
      objCalicon.innerHTML = "";
    }
  }
}



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5616 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Thanks Tony, I'll check it out this afternoon (That would be evening to you on the other side of the pond) and post the new code.


   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Most recent: 8204 Gen 48 in Test and Production.
   Currently Available. Please contact me.
 
Posts: 3040 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
Expert
posted Hide Post
Doug,

I really should have downloaded and read your code first - it uses ibirls3 and not ibirls2 which is what was prevalent when I used the code I supplied above.

I'll check ibirls3 and see if there is a way or you could just enclose the calendar control in a <div> and change the display attribute - which is, quite honestly, the easier way of doing it?

T



In FOCUS
since 1986
WebFOCUS Server 8.2.01M, thru 8.2.06 on Windows Svr 2008 R2  
WebFOCUS App Studio 8.2.06 standalone on Windows 10 
 
Posts: 5616 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Expert
posted Hide Post
Doug,

Check for a PM from me containing the code using a div to hide and show.

T
 
Posts: 5616 | Location: United Kingdom | Registered: April 08, 2004Reply With QuoteReport This Post
Member
posted Hide Post
i've used the following JS.
 var imageArray = document.getElementsByTagName("img");
 var imageArray_len = imageArray.length;
 for (var i=0; i < imageArray_len; i++) {
 if(imageArray[i].id == "") {
  imageArray[i].style.display = "NONE";
  break;
 }
 }  

and it worked.
i've ID attribute for all the images i use in HTML page.
The only IMG tag without the ID attribute is this calender. So it'll be hidden.


-Gokul,
WebFOCUS 769, 773, Windows XP, 7.
 
Posts: 9 | Location: India | Registered: October 07, 2009Reply With QuoteReport This Post
Expert
posted Hide Post
Thanks for all the insight which I used to come up with a solution which was easily implemented using the GUI (after understanding your insight and remembering what Ed Nowacki mentioned while at Ford Motor).

What I did was to add the calendars controls and the associated labels in to a "panel" then, programatically thru the associated functions, made the panel either visible or hidden. The other controls were controlled the same way.

NOW: Wink

Thanks Again.


   In FOCUS Since 1983 ~ from FOCUS to WebFOCUS.
   Most recent: 8204 Gen 48 in Test and Production.
   Currently Available. Please contact me.
 
Posts: 3040 | Location: Middle Tennessee [8204M Gen48 in Test&Prod] | Registered: February 23, 2005Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     [SOLVED] Hide the Calendar Text Box AND Calendar Icon

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.