Staff want the indicators to be available on the instructional analysis page via show/hide functionality. I've taken functionlity that I had written previously and modified it to be a little more generic. I'm still not sure if the method I've chosen to provide the functionality requested is the best one, but I think it'll do for now. I still have to document the code, which I guess I'll get to tomorrow.
I'm running into two problem I'm not sure how I'm going to address just yet.
One, the styling for the text around the show/hide area diverts from the requested styling. I know why it's doing this (margin stylings and those cursed rules for collapsing margins), but I'm not sure how I'm going to address it just yet. It's a fairly inocuous problem ... a little extra space below the item, but it's one that seems to be a sticking point for the comm staff. There are a number of ways to work around this problem, I just need to find the one that requires the least amount of fudging.
Two, Mozilla doesn't want to play nice with the script. It's not stopping propagation and thus following the back-up link specified for compatibilty with non-js browsers. I'm sure I'll figure out what's going on eventually.
Update 2004-12-23: Fixed the problems I referenced above.
One - since the styling was being affected by adjacent margins I ensured that the margins were not "touching" by adding a 1px padding to the bottom of the container div. IE had no problems to begin with since it does not implement collapsing margins correctly. Problem solved.
Two - the DOM event model doesn't allow for a return value from an event added using the addEventListener method. IE had no problems because 1) it ignores this rule and 2) you can always use the event's returnValue property to provide a return value. The DOM does, however, include a method to prevent the default action from occuring, preventDefault. Problem solved.
Update 2004-12-23: No sooner did I think I'm done than another problem is encountered. Looks like Safari doesn't support the preventDefault method. I'll have to do some research next week.
Update 2004-12-27: After a bit more research I found plenty of references indicating that Safari does in fact support preventDefault. Safari itself indicates that it supports the method, but I have been unable to get it to not follow a link by using the method. I'll probably do a little bit more research tomorrow, but for now I've coded up a work-around that is acceptable (if not desirable). When Safari is detected the link is modified to be "javascript: return false". It may be ugly, but it works.
Wednesday, December 22, 2004
Blog Archive
-
▼
2004
(63)
-
▼
December
(18)
- Mass Mailing
- HS Bio Textbook Report
- HS Bio Textbook Report
- Checking the locks
- HS Bio Textbook Report
- Site Design
- SVG Plug-in OS-Browser combos
- HS Bio Textbook Report
- Checking the locks
- Site reorganization
- 2005 Workshops
- Checking the locks
- Firefox bug?
- HS Bio Textbook Report
- Webtrends irregularity
- Checking the locks
- I am not spam
- IERI Utility
-
▼
December
(18)