Witam
Zrobiłem stronę na której jest pokaz slajdów.
Na serwerze lokalnym wszystko jest ok a na serwerze online pokaz slajdów nie działa.
Czy funkcje JS muszą być deklarowane zaraz po body w html?
Ja napisałem po body jakies menu a później dopiero script i funkcje JS.
Czy może to być przyczyną(IMG:
http://forum.php.pl/style_emoticons/default/questionmark.gif)
oto kod index.php:
<?php
require_once('funkcje_galerii.php');
wyswietl_naglowek_html();
?>
<script language="JavaScript">
// configuration structure
var A_TPL = {
// randomize the array each time page loads
'random' : false,
// number of transparency changes during the transition
// increase for smoother transition, reduce for less CPU usage
'steps' : 20,
// transition duration in seconds
'transtime': .5,
// slide time in seconds
'slidetime': 3,
// width of the slide (optional)
'width' : 780,
// height of the slide (optional)
'height': 500,
// alt text for the image (optional)
'alt' : 'Grzegorz Buczylowski - fotogallery',
// css class assigned to the slide <img> (optional)
'css' : ''
};
// list of images to display
var A_ITEMS = [<?php
$s_path = './img/';
$a_types = array ('jpg', 'gif', 'jpeg', 'png'); while ($s_file = readdir($h_dir)) { }
?>
];
// fader initialization
var mySlideShow = new tFader (A_ITEMS, A_TPL);
</script>
<?php
wyswietl_stopke_html();
?>
i funkcja wyswietl nagłóek (część):
<script language="JavaScript" src="./js/tFader.js"></script>
<script type="text/javascript" src="./js/lightbox.js"></script>
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
</head>
<body bgcolor="#000000">
<div id="calosc">
<div id="menu">
<img src="logo.jpg" />
<a href="index.php">Home</a>   
<a href="aboutme.php">Abaut me</a>   
<a href="gallery.php">Gallery</a>   
<a href="contact.php">Contact</a>
</div>
<div id="ramka">
<?php
}
?>
Dzięki za pomoc