PDA

View Full Version : Sequential Content Viewer IE Problem



Kovo
03-17-2007, 04:44 AM
1) Sequential Content Revealer
2) http://dynamicdrive.com/dynamicindex17/seqreveal.htm
3) Visit www.kovo.ca/audrey/home1.html - In FF after the first two fades are complete, the navigation starts to appear and all is PERFECT. In IE, mind the lack of PNG support, the navigation never reveals.

Any ideas? Thanks!

Kovo
03-17-2007, 12:56 PM
any ideas?

Kovo
03-17-2007, 10:49 PM
Ok I figured out why, it is because the Div that the sequential content is location in has the display:hidden effect since I am using a fade in effect. IS there a way to modify this script to use the display attribute rather than the visbility attribute?

ddadmin
03-18-2007, 09:21 AM
Ok I figured out why, it is because the Div that the sequential content is location in has the display:hidden effect since I am using a fade in effect. IS there a way to modify this script to use the display attribute rather than the visbility attribute?

I don't see why not. Basically, you'd change all references to "visibility" inside the script to "display", and their values accordingly as well ("none" and "block"|inline"). Something like:


<style type="text/css">

.revealcontent{
display: none;
}

</style>

<script type="text/javascript">

/***********************************************
* Sequential Content Revealer- Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/

var contentpause=1000 //customize time each content should pause for before the next one is revealed (1000=1 second)
var once_session=0 //Should "reveal" animation only be applied once per browser session? (0=no, 1=yes):

var curobjindex=0
var orderoffset=100

function collectElementbyClass(){
var classname="revealcontent"
glidearray=new Array()
var inc=0
var alltags=document.all? document.all : document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags[i].className==classname){
glidearray[inc++]=alltags[i]
glidearray[inc-1].displayorder=(glidearray[inc-1].getAttribute("displayorder"))? parseInt(glidearray[inc-1].getAttribute("displayorder")) : inc+orderoffset
}
}
if (glidearray.length>0){
glidearray.sort(compareorder)
seqreveal()
}
}

function seqreveal(){
if (curobjindex<glidearray.length){
glidearray[curobjindex].style.display="inline"
var actualpause=(glidearray[curobjindex].getAttribute("pausesec"))? parseFloat(glidearray[curobjindex].getAttribute("pausesec"))*1000 : parseFloat(contentpause)
glidetimer=setTimeout("seqreveal()",actualpause)
curobjindex++
}
}

function compareorder(a, b){
return a.displayorder-b.displayorder
}

function get_cookie(Name) {
var search = Name + "="
var returnvalue = ""
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1)
end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

if (once_session && get_cookie("textdisplayed")=="" || !once_session){
if (window.addEventListener)
window.addEventListener("load", collectElementbyClass, false)
else if (window.attachEvent)
window.attachEvent("onload", collectElementbyClass)
else if (document.getElementById)
window.onload=collectElementbyClass

if (once_session)
document.cookie="textdisplayed=yes"
}
else
document.write('<style>\n.revealcontent{display:inline;}\n</style>')
</script>

In this case I'm using a value of "inline", though you may want to change it to "block" instead if you want the revealed elements to be block level elements.

BTW, please note that your page is currently in violation of our usage terms, since the credit notice doesn't appear inline on the page. Please reinstate the credit notice:

Kovo
03-21-2007, 11:01 PM
Another question

How could I,say, reset the sequential script after it has loaded already.

For example, say I load the page and the script executes. How can I reset the script so that it re-executes and re-shows all the content without refreshing the page?

Thanks