Hello All, I am pretty new to this group and I tried searching for my issue but couldn't find an answer. However I apologize if this question has been asked before.
I am trying to flip between 2 DIV's when user click on menu links by using the Fade/Apear effects. I am using an Ajax script (below) to load the page content and assign it to the innerHTML of each DIV . Then at the end of this script I call Effect.Apear and Effect.Fade (in this order) to switch between the DIV's. I'm using the Fade and Apear to create fading effect between the pages. Everything works fine except a couple small annoying artifacts. 1. The fading DIV gets cuttoff and the very end of the Fade effect just before the effect is completed (or maybe the effect is stopping before fading the entire page), causing a small blink on the page rather than finishing the effect smoothly. 2. The content in the apearing DIV seem to get pixelated in the edges while the effect is executing. Once the effect is completed execution, the content switch to its normal smooth look. This also create a small blink on the page. I was wondering if I'm doing anything wrong or am I missing anything. Thanks in advance, ****** This is the script I'm using ******************* var loadedobjects="" var rootdomain="http://"+window.location.hostname var containerid="" var oldcontainerid="" var newPane="" var oldPane="" function loadPage(url){ if(containerid != "pane1"){ containerid = "pane1"; oldcontainerid = "pane2"; }else{ containerid = "pane2"; oldcontainerid = "pane1"; } var page_request = false if (window.XMLHttpRequest) // if Mozilla, Safari etc page_request = new XMLHttpRequest() else if (window.ActiveXObject){ // if IE try { page_request = new ActiveXObject("Msxml2.XMLHTTP") } catch (e){ try{ page_request = new ActiveXObject("Microsoft.XMLHTTP") } catch (e){} } } else return false page_request.onreadystatechange=function(){ loadpage(page_request, containerid) } page_request.open('GET', url, true) page_request.send(null) } function loadpage(page_request, containerid){ if (page_request.readyState == 4 && (page_request.status==200 || window.location.href.indexOf("http")==-1)) document.getElementById(containerid).innerHTML=page_request.responseText newPane = document.getElementById(containerid); oldPane = document.getElementById(oldcontainerid); Effect.Appear(newPane); Effect.Fade(oldPane); } ******************************************************************* --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
