[SOLVED] Hide Webfocus calendar image in Webfocus 8.1
Hello,
I tried hiding the Webfocus calendar icon by using the code below. //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;iif (images[i].src.indexOf("dynCalendar.gif")>0) { //If it is, hide images[i].style.visibility='hidden'; } }
For some reason this code does not work. also if try seeing the source code the it is no more dynCalendar.gif but it is dynCalendar.png. I tried this option also but it does not work. Kindly let me know if anyone was able to solve the issue.
Thank you, PrajaktaThis message has been edited. Last edited by: Prajakta,
Webfocus 8.1.0.5 Windows, all output
April 15, 2019, 06:13 AM
Addy
Hello,
You can always use Jquery.
Hide all images
$("img").hide();
With image class name:
$('.img_class').hide();
With image Id :
$('#img_id').hide();
Are you still on V7.6?
All the best!!
WF 8.2.04 Windows/Unix All Formats In Focus since 2006
April 15, 2019, 06:35 AM
Prajakta
Hello Addy,
Thank you for the reply! I am using version 8.1.0.5. I do not want to hide all the images. The code worked for me. The tabindex for the dyncalendar.gif was "-1" and hence that was not working.
Thank you, Prajakta
Webfocus 8.1.0.5 Windows, all output
April 15, 2019, 07:54 AM
MartinY
Try with this
// This funstion is to hide the Calandar icon which is not hidding when hide control
function hideCalendarIcon() {
//get all images on the page into array
images=document.getElementsByTagName("img");
//get the number of images in array
numImages = images.length;
//Loop through images and see if it is a dynCalendar
for (i=0;i<numImages;++i) {
if (images[i].src.indexOf("dynCalendar.png")>0){
//If it is, hide
images[i].style.visibility='hidden';
}
}
}
// This funstion is to show the Calandar icon
function showCalendarIcon() {
//get all images on the page into array
images=document.getElementsByTagName("img");
//get the number of images in array
numImages = images.length;
//Loop through images and see if it is a dynCalendar
for (i=0;i<numImages;++i) {
if (images[i].src.indexOf("dynCalendar.png")>0){
//If it is, show
images[i].style.visibility='visible';
}
}
}
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007
April 15, 2019, 08:06 AM
Prajakta
Thank you Martin!
Webfocus 8.1.0.5 Windows, all output
April 15, 2019, 08:28 AM
MartinY
Has it fixed your issue ? If so, my pleasure and please update your first post then add [SOLVED] at the beginning of the subject.
WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF In Focus since 2007