Solved

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

Posted on 2011-02-19
3
380 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
Comment Utility
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
Comment Utility
i fixed the problem by manualy deleting some old files from my remote server
0
 

Author Closing Comment

by:falfouli
Comment Utility
i found the answer myself by checking my remote servert
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Samba is the de-facto standard program (or, more correctly: suite of programs) that UNIX and Linux systems use to share files with Microsoft Windows (and more recently, Mac OS-X) systems. Currently, there are 2 common versions of Samba available,…
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 …
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now