Advertisement

10.22.2008 at 05:26PM PDT, ID: 23839201
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.1

SlideDown function not working onload (Scriptaculous)

Asked by RichardMass in JavaScript Frameworks, Cascading Style Sheets (CSS), Extensible HTML (XHTML)

Tags:

Hi everyone.

I have a page where I am setting animation orders using an onload function (as seen below). On load, the page fades in, I am then wanting to have "slidedown_demo" slide down in the "header div".

I have tried using the same code I have used for Fade and Appear and had no luck. If I tell the script to slidedown all the content instead of "appear" all the content it slides down however I can not make this one little div slide into it's position. The onclick test button that I have within the main paragraphs work but not when I attempt to use the onload feature that brings the rest of the content into view.

Any assistance would be greatly appreciated. Please ask if further clarification is required.

Richard.Start Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<link href="css/default.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="javascript/scriptaculous.js"></script>
<script type="text/javascript" src="javascript/prototype.js"></script>
<script type="text/javascript" src="javascript/effects.js"></script>
<script type="text/javascript">
window.onload = begin;
 
function begin()
{
new Effect.Appear(document.getElementById('DivLayout-Fadewrapper'), { duration: 2.0, delay: 4.0});
new Effect.Fade(document.getElementById('DivLayout-Loadingwrapper'), { duration: 2.0, delay: 2.0});
new Effect.SlideDown(document.getElementById('slidedown_demo'), { duration: 2.0, delay: 2.0});
 
 
}
 </script>
<script type="text/javascript">
function handleClick(elemId,href){
$(elemId).fade(); 
  setTimeout("nav('"+href+"')",1500);
return false;
}
 
function nav(href){
 location.href=href;
}</script>
 
 
</head>
 
<body>
  <div id="DivLayout-Loadingwrapper">
    <img src="images/loading.gif" alt="Loding indicator" class="loadingimage" /><br />
	<span>Now loading website - Please wait</span>
	<p>Note: Your browser must have Javascript enabled to view this website, if page content does not load
	shortly, please check your browsers settings.</p>
  </div>
  <div id="DivLayout-Fadewrapper" style="display:none">
    <div id="DivLayout-Mainwrapper">
      <div id="DivLayout-Headwrapper">
	    <div id="slidedown_demo" style="display:none; width:80px; height:80px; background:#ccc; text-align:center;">
          <div>
            This is some test content. This is some test content.
          </div>
        </div>
	  </div>
	  <div id="DivLayout-Menuwrapper">Content for  id "DivLayout-Menuwrapper" Goes Here</div>
      <div id="DivLayout-Contentwrapper">
        <p>Content for  id "DivLayout-Contentwrapper" Goes Here</p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <p><a href="test.html" onclick="return handleClick('DivLayout-Fadewrapper',this.href);">test link</a></p>
        <p>&nbsp;</p>
        <p>&nbsp;</p>
        <li><a href="#" onclick="Effect.SlideDown('slidedown_demo'); return false;">Click here for a demo!</a></li>
        <p>&nbsp;</p>
      </div>	  
      <div id="DivLayout-Basewrapper"><!--Creates base shadow--></div>
    </div>
	<div id="DivLayout-Copyrightwrapper">
	  <span>
		W3C Standards compliant XHTML | CSS by Richard Massey<br />
		Copyright &copy; 2008, -------------, All rights reserved.
	  </span>
	  <a href="test.html" onclick="return handleClick('DivLayout-Fadewrapper',this.href);">Link One</a>|
	  <a href="test.html" onclick="return handleClick('DivLayout-Fadewrapper',this.href);">Link Two</a>|
	  <a href="test.html" onclick="return handleClick('DivLayout-Fadewrapper',this.href);">Link Three</a>|
	  <a href="test.html" onclick="return handleClick('DivLayout-Fadewrapper',this.href);">Link Four</a>|
	  <a href="test.html" style="margin-right:0" onclick="return handleClick('DivLayout-Fadewrapper',this.href);">Link Five</a>
	</div>	
  </div>
</body>
</html>
[+][-]10.23.2008 at 01:31AM PDT, ID: 22784062

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]10.23.2008 at 02:15PM PDT, ID: 22790760

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]10.24.2008 at 11:20AM PDT, ID: 22798720

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: JavaScript Frameworks, Cascading Style Sheets (CSS), Extensible HTML (XHTML)
Tags: Scriptaculous, CSS, XHTML
Sign Up Now!
Solution Provided By: sh0e
Participating Experts: 1
Solution Grade: B
 
 
[+][-]10.25.2008 at 01:54PM PDT, ID: 22804965

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081119-EE-VQP-49 / EE_QW_2_20070628