Umarım bu konuda bana yardım edebilirsin!
$ Filmler adı verilen bir dizinin öğeleri olarak yer alan film ayrıntıları (başlık, yönetmen, yıl) ile bir filmContents.php dosyası var.
Şuna benziyor:
<?php
$films = array(
'movieOne' => array(
'title' => array(
'en'=>'Movie ONE',
'es'=>'PELICULA UNO'
),
'director' => 'John Doe 1',
'year' => '2011'
),
'movieTwo' => array(
'title' => array(
'en'=>'Movie TWO',
'es'=>'PELICULA DOS'
),
'director' => 'John Doe 2',
'year' => '2010'
),
'movieThree' => array(
'title' => array(
'en'=>'Movie THREE',
'es'=>'PELICULA TRES'
),
'director' => 'John Doe 3',
'year' => '2009'
),
'movieFour' => array(
'title' => array(
'en'=>'Movie Four',
'es'=>'PELICULA CUATRO'
),
'director' => 'John Doe 4',
'year' => '2008'
),
'movieFive' => array(
'title' => array(
'en'=>'Movie FIVE',
'es'=>'PELICULA CINCO'
),
'director' => 'John Doe 5',
'year' => '2007'
),
'movieSix' => array(
'title' => array(
'en'=>'Movie SIX',
'es'=>'PELICULA SEIS'
),
'director' => 'John Doe 6',
'year' => '2007'
)
);
?>
ne yapmak isterim:
Bir filmin ayrıntılarının görüntülendiği Ana üst Div ile bir sayfanın ve her filmin en üst Div.
Bunu mükemmel bir şekilde yapabilirim ... Alt kaydırma Div'umda 15 filmim olduğunda ve sağdaki son filmi tıklıyorum, tüm sayfayı yükler, böylece alt kaydırma Div'u aynı yerde kalmaz Son filmin linkini tıkladığımda, eğer bu alt kaydırma Div'inin başlangıcına gitmediyse.
Bu benim films.php dosyası:
<?php include_once("filmsContent.php");
@$film = $_REQUEST['title'];
?>
<head>
</head>
<body>
<?php
echo "<div class='content'>"; ?>
<div class='films'>
<?php echo $films[$film]['title']['en']."
";
echo $films[$film]['director']."
";
echo $films[$film]['year']."
";
?>
</div>
<div style='width: 200px; height: 60px; overflow: auto; overflow-y: hidden;'>
<div style='width: 700px;'>
<?php
foreach($films as $film=>$attribute)
{
echo "".$films[$film]['title']['en']." | ";
}
?>
</div>
</div>
</div>
</body>
</html>
What I wish is to have the Top Div reloaded with the info of the movie I choose every time, and only that Div, not the entire page, that way the bottom scrolling Div will behave independently of the Top Div.
I want to avoid Iframes or Objects. I believe I need to use JQuery, AJAX, but I don't know how to make it work. I've been searching for hours to find the solution for this and I had no luck.
Could you help me please?
Thanks!