?
Solved

Why isn t my spry data working on my remote server?

Posted on 2011-02-19
3
Medium Priority
?
385 Views
Last Modified: 2013-12-02
hi
my site is www.islamobec.com
my sliding panel is generated dynamically using spry data
when i preview my work in any browser or live view it works perfectly fine but when i uploaded it to my remote server i don t see what i expect?.
0
Comment
Question by:falfouli
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 34934015
Hi falfouli,

My guess is that the following script is screwing up the panels:

<script>
function setPanelNavigation() {
     var current = sp1.getCurrentPanel(); // Get the current panel
     var panelCount = sp1.getContentPanelsCount(); // Get the total number of panels
     var panelNumber=1; // Give a value to the first panel number
     Spry.$$(".SlidingPanelsContent").forEach(function(node) { // Cycle through the panels
          if (node.id==current.id){ // The current panel now receives a number
               Spry.$$("a#previousPanel").removeClassName("disabled"); // Show image
               Spry.$$("a#nextPanel").removeClassName("disabled"); // Show image

               if ( panelNumber==1 ) Spry.$$("a#previousPanel").addClassName("disabled"); // Hide image if 1st panel

               if ( panelNumber==panelCount ) Spry.$$("a#nextPanel").addClassName("disabled"); // Hide imageif last panel
          }
          panelNumber++; // Go to next panel after incrementing the count
     });
}
Spry.Utils.addLoadListener(setPanelNavigation); // Set buttons to initial value
</script>

Open in new window


I'm able to get it working in a basic state with the following page code:

<!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=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript" src="spryassets/SprySlidingPanels.js"></script>
<link href="spryassets/SprySlidingPanels.css" rel="stylesheet" type="text/css" />

</head>

<body>
<div id="SlidingPanels1" class="SlidingPanels">
	<div class="SlidingPanelsContentGroup">

		<div id="p1" class="SlidingPanelsContent">
			<p>first product</p>
<p>45.00$</p>
	  </div>
		<div id="p2" class="SlidingPanelsContent">
			<p>Panel 2</p>

			<p>Panel 2</p>
		</div>
		<div id="p3" class="SlidingPanelsContent">
			<p>Panel 3</p>
			<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
		</div>
		<div id="p4" class="SlidingPanelsContent">

			<p>Panel 4</p>
			<p>Panel 4</p>
		</div>
    </div>
</div>
<a href="#" onclick="sp1.showFirstPanel();">First Panel</a>
<a href="#" onclick="sp1.showLastPanel();">Last Panel</a>  
<a href="#" onclick="sp1.showNextPanel();">Next Panel</a> 
<a href="#" onclick="sp1.showPreviousPanel();">Previous Panel</a>  
<script type="text/javascript">    
var sp1 = new Spry.Widget.SlidingPanels("SlidingPanels1",{defaultPanel:3, duration:200});

</script>

</body>
</html>

Open in new window

0
 

Accepted Solution

by:
falfouli earned 0 total points
ID: 34934409
i fixed the problem by manualy deleting some old files from my remote server
0
 

Author Closing Comment

by:falfouli
ID: 34968276
i found the answer myself by checking my remote servert
0

Featured Post

10 Questions to Ask when Buying Backup Software

Choosing the right backup solution for your organization can be a daunting task. To make the selection process easier, ask solution providers these 10 key questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Adobe Dreamweaver CS5 is a WYSIWYG web page editor that has advanced HTML, CSS, and Javascript rendering functionality and is probably the most well-known HTML editor available. Much of Dreamweaver's appeal centers around the Design View interfac…
In this blog, we’ll look at how improvements to Percona XtraDB Cluster improved IST performance.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Suggested Courses
Course of the Month10 days, 10 hours left to enroll

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question