by Admin
11. February 2010 08:40
I came across a problem when using jCarousellite for a vertical scroller. I have found that in IE 7, the carousel is out of sync by a few pixels each time it rotates. I am using a static height of 60px and showing only 2 records at a time.
In order to fix this for my situation I had to add a few things. In my html:
<script type="text/javascript" src="/scripts/Jcarousel/jcarousellite_1.0.1.js"></script>
<script type="text/javascript">ie7 = false;</script>
I addded a global variable called ie7 and set it to false as soon as this component is loaded and then later in the file when I add my styles for jCarousellite:
<!--[if IE 7]> <script type="text/javascript">ie7 = true;</script> <![EndIf]-->
This will help me in the jCarousellite source file which can be downloaded here.
At the end of this file I will be changing this:
function height(el) {
return el[0].offsetHeight + css(el, 'marginTop') + css(el, 'marginBottom');
};
To this:
function height(el) {
if (ie7) {
return el[0].offsetHeight;
} else {
return el[0].offsetHeight + css(el, 'marginTop') + css(el, 'marginBottom');
}
};
This solution wont work for everyone but it works for me because in ie7, instead of trying to force my margins and paddings to 0, I just ignore them and look only for the height of the element.
e564c83b-e495-49a4-b061-3e8a0ed775ef|1|5.0
Tags:
by Admin
21. January 2010 04:26
Recently I've had a problem with firefox. It would take up to 10 seconds for each DNS request making browsing to any site extremely slow.
I tried clearing caches, changing settings in about:config but nothing worked.
The only thing that worked was to create a new default profile for Firefox and copy all the bookmarks, extenstions, etc over to the new one.
3da4b814-1a6e-44f6-a487-aea720bb2f73|0|.0
Tags:
by Admin
8. September 2009 17:06
I ran into an issue recently while comparing a datetime entry from an HTML form to a DateTime field in SQL. When .NET parses the entry into a DateTime object and the Time is omitted, it throws off the comparison when it gets to the SQL.
For instance, a user enters "9/8/2009" instead of "9/8/2009 5:00 PM"
To get around this, I came across this little hack for SQL which strips off the time from the SQL datetime when doing the comparison :
(SELECT CAST(FLOOR(CAST(someDate AS float)) AS datetime)
What this does:
1. Casts someDate to a float which truncates the time on conversion.
2. Casts back to a datetime which leaves you with a date like 9/8/2009 00:00:00
32cb69ba-ee4d-4e78-a563-4e1e5bc78bd5|0|.0
Tags:
by Admin
4. July 2009 07:35
25efd73b-b9f0-4588-985c-52b881c29673|0|.0
Tags:
by Admin
3. July 2009 17:25
9202e635-e9a8-487f-b0b8-1eb25277b567|1|5.0
Tags: