Solved

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

Posted on 2011-02-19
3
384 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

Comparison of Amazon Drive, Google Drive, OneDrive

What is Best for Backup: Amazon Drive, Google Drive or MS OneDrive? In this free whitepaper we look at their performance, pricing, and platform availability to help you decide which cloud drive is right for your situation. Download and read the results of our testing for free!

Question has a verified solution.

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

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
If, like me, you have a lot of Dell servers in the estate you manage this article should save you a little time. When attempting to login to iDrac on any server I would be presented with two errors. The first reads "Do you want to run this applicati…
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.…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

728 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