Solved

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

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

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

733 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