Sie können mich buchen für:
Individuelle Schulungen für XPages, JavaScript und Appcelerator Titanium Software-Entwicklung für IBM XPages, Appcelerator Titanium (Mobile Apps iPhone, iPad, Android, Blackberry 10), Mobile Web und IBM Notes
I. Need. Help. From a CSS/Dojo pro.
Julian Buss, July 28th, 2009 14:03:16
Tags:  XPages 
Here is the task, should you accept it:

Place a div on your page so that it is not visible. Then use dojo.fadeIn() to make it visible.

1.) Do this in Firefox. You should be done in some seconds using the css property "opacity".

2.) Now do this in Internet Explorer 7 or 8.
(This worst freaking browser ever does not understand opacity, but you may find that it understands "filter:alpha(opacity=0)").

3.) And now, make that div to a dijit.form.slider and try again to have it hidden on page load in Internet Explorer.

Maybe I am unworthy to deal with Internet Explorer. But I was not successful in having a dojo slider hidden on page load and fading it in on click of a button in Internet Explorer. Are you?
Comments (4) | Permanent Link

Comments:
1) I. Need. Help. From a CSS/Dojo pro.
Jeremy Hodge 28.07.2009 16:38:21

Hey Julian ... I do this with a panel in xPages, and was having the same problem (getting it to show/hide properly and fadeIn on call ... here's what I ended up doing as a solution.

First, assign the div the class "startsHidden" ... here's the CSS definition for that class:

.startsHidden {

visibility: hidden;

}

then, add this code to your page:

dojo.addOnLoad(function(){

dojo.query(".startsHidden").style({ opacity:0 });

});

then, in your button to fadeIn() the object:

dojo.style("objectsId","visibility","visible");

dojo.fadeIn({node: "objectsId"}).play();

If you want to fade it back out, here is the code:

dojo.animateProperty({node: "objectId", properties: { opacity: 0 }, onEnd: function() { dojo.style("objectId","visibility","hidden");}}).play();

That works for me in both Firefox and at least IE7, havent tested IE8 yet....

2) I. Need. Help. From a CSS/Dojo pro.
Jerry Carter 28.07.2009 21:49:12

Just a side note but related to IE's out of the box rendering capability... it's there, just exposed in a MS kind of way (read of course as "non standard" and "sucks"). You're on the trail with filter - but what you probably need to do for really good IE UI effects is start getting an understanding of DirectX. Even if you haven't installed the directX SDK, there are a lot of base effects that ship with Windows that IE can utilize. Proper alpha shading is one of these. Rather than dig through my own past exp with this, you'd be well served Googling a bit about the subject as no doubt, things have changed a bit since I last messed with this. Aside from what Jeremy posted above (not sure if you've had success with it in your situation or not), getting IE to do some of the things FF does easily will usually take some reinvention.

3) I. Need. Help. From a CSS/Dojo pro.
Julian Buss 29.07.2009 17:13:22

Jeremy, thanks for the tip. I thought of something similar but hoped for an easier solution.

I hate it do to extra code just for damn freaking IE :-(

4) I. Need. Help. From a CSS/Dojo pro.
youtube html5 player 26.03.2012 14:57:53

Thanks for sharing your info. I really appreciate your efforts and I will be waiting for your further write ups thanks once again.

Add a comment
Subject:
   
Name:
Mail:
Web:
 
Comment:  (No HTML - URLs with leading http://)
 
remember me?   
You can hire me.
See my Linkedin profile for details.

Thanks for reading and have a nice time here!

Please note my Apps for iPhone and iPad: NotesBook: takes your Lotus Notes Notebook (Journal) to your iPhone and iPad xpageswiki.com: huge XPages Tips & Tricks collection for iPhone and iPad