Solved

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

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
jquery, dropdown 4 61
Concurrent Sessions 6 36
TCP Error code:Unable to connect to a banking site 4 41
file upload jquery, send variables 3 20
Have you ever stumbled upon a software that is so great that you just love? It happened to me. Love at first sight. Filezilla Server.   Ok its not the most advanced ftp server I've came across. But its a fairly simple piece of software to get the …
Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

813 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now