Hello EB
I have an issue : In my photo website I have created a gallery where I can scroll back or forward my pics and view all the albums, but scrolling the pics already big size.
I want to add a div to put on the left handside of the page, where I wish to view all the related thumbs of the gallery
I created on my server website 2 folder. (bigger size, viewable on the page, and the bigger size viewble clicking the link, blow-up the image.
Now I am going to create the 3rd folder where I create automatically the thumbs whjere will be stored them.
With a script php I take the data from the mysql and print the images on the screen.
For the gallery of the normal size pics, I create a mix between php and javascriptt
see this please
On the left as I told before i want to put the gallery thumbs so the people can choose the pics they want and view the related image, that will change in the middle of the screen
How could i do? any suggestions?the difference between the other script is that all the thumbs are viewed together , not like the image in the center, that change. SO I must keep inmind this.
Sorry. i don't know how to print the thumbs on the screen and to link them to every related image in the middle.
<script type="text/javascript" language="JavaScript">
var photos=new Array()
var text=new Array()
var link=new Array()
var which=0
<?php
$host = "x";
$user = "Sx";
$password = "x";
$dbname = "x";
//CREO LA VARIABILE CHE CONNETTE IL SERVER AL DATABASE
$cxn = mysql_connect($host,$user,$password);
mysql_select_db($dbname);
$item=0;
//CONTROLLO CONNESSIONE SE è OK
if (!$cxn)
{
echo 'Errore durante la connessione al server MySQL';
exit();
}
else {
$sql = "SELECT * FROM bn ORDER BY descrizione";
$result = mysql_query ($sql);
while ($row = mysql_fetch_row($result))
{
if ( $item == 0 ) { $_primafoto = $row[0]; }
if ( $item == 0 ) { $_primolink = "<a target='blank' href='[0].".jpg'>Ingrandisci l'immagine - Bigger size </a>";}
if ( $item == 0 ) { $_firstext = $row[1]; }
echo "photos[".$item."]=\"bn/".$row[0].".jpg\";";
echo "text[".$item."]=\"".$row[1]."\";";
echo "link[".$item."]=\"<a target='blank' href='[0].".jpg'>Ingrandisci l'immagine - Bigger size </a>\";";
$item=$item+1;
}
}
?>
function arrow()
{
document.getElementById( "back2" ).style.display = "none";
}
function changePic(dir) {
var testo = document.getElementById( 'testo' );
var collegamento = document.getElementById( 'collegamento' );
var image = document.images.photoslider,
fwdBtn = document.getElementById('forward2'),
backBtn = document.getElementById('back2'),
n = photos.length-1;
if (dir == "next") {
which = (which < n) ? which + 1 : which;
image.src = photos[which];
testo.innerHTML = text[ which ];
collegamento.innerHTML = link[ which ];
backBtn.style.display = "inline";
if (which == n) {
fwdBtn.style.display = "none";
}
} else if (dir == "back") {
which = (which > 0) ? which - 1 : which;
image.src = photos[which];
testo.innerHTML = text[ which ];
collegamento.innerHTML = link[ which ];
fwdBtn.style.display = "inline";
if (which === 0) {
backBtn.style.display = "none";
}
}
return false;
}
</script>
</head>
<body OnLoad="arrow()">
<div class="container2">
<div id="logo" > </div>
<div class="menu">
<a href=" </a>
<a href=" sono </a>
<a href=" </a>
<a href=" </a>
<a href=" </a>
<a href=" </a>
</div>
<div id="backbn">
</div>
<div id='iconesx' name="thumb">
THUMBS (HERE I WISH TO VIEW THE THUMBS!
</div>
<div class="gruppofoto2"><a href="gallerymacro.php">Macro</a><a href="gallerypaesaggi.php">Paesaggi</a><a href="galleryritratti.php">Ritratti</a><a href="gallerybn.php">Urbana e Street</a><a href="gallerynotturna.php">Notturna</a><a href="galleryanimali.php">Natura e Animali</a><a href="galleryvarie.php">Varie</a><img src="bn/<?php echo $_primafoto; ?>" name="photoslider">
<div id='testo'><?php echo $_firstext; ?></div>
<div id='collegamento'><?php echo $_primolink; ?></div>
</div>
<div class="scorri">
<a href="#" onclick="return changePic('back');"><img id="back2" style="border:0px" src="indietro.jpg"></a>
<a href="#" onclick="return changePic('next');"> <img id="forward2" style="border:0px" src="avanti.jpg"></a>
</div>
<div class="inizio"><a href="#" onclick="which=1; changePic('back');return false" >Inizio - Start</a>
</div>
<div id="footer">Created by Paolo Bergomi</div>
</div>
</body>
</html>
THIS IS THE DIV FOR THE THUMBS
<div id='iconesx' name="thumb">
THUMBS (HERE I WISH TO VIEW THE THUMBS!
</div>
Thanks a lot for everybody 's attention
paolo
I have an issue : In my photo website I have created a gallery where I can scroll back or forward my pics and view all the albums, but scrolling the pics already big size.
I want to add a div to put on the left handside of the page, where I wish to view all the related thumbs of the gallery
I created on my server website 2 folder. (bigger size, viewable on the page, and the bigger size viewble clicking the link, blow-up the image.
Now I am going to create the 3rd folder where I create automatically the thumbs whjere will be stored them.
With a script php I take the data from the mysql and print the images on the screen.
For the gallery of the normal size pics, I create a mix between php and javascriptt
see this please
On the left as I told before i want to put the gallery thumbs so the people can choose the pics they want and view the related image, that will change in the middle of the screen
How could i do? any suggestions?the difference between the other script is that all the thumbs are viewed together , not like the image in the center, that change. SO I must keep inmind this.
Sorry. i don't know how to print the thumbs on the screen and to link them to every related image in the middle.
<script type="text/javascript" language="JavaScript">
var photos=new Array()
var text=new Array()
var link=new Array()
var which=0
<?php
$host = "x";
$user = "Sx";
$password = "x";
$dbname = "x";
//CREO LA VARIABILE CHE CONNETTE IL SERVER AL DATABASE
$cxn = mysql_connect($host,$user,$password);
mysql_select_db($dbname);
$item=0;
//CONTROLLO CONNESSIONE SE è OK
if (!$cxn)
{
echo 'Errore durante la connessione al server MySQL';
exit();
}
else {
$sql = "SELECT * FROM bn ORDER BY descrizione";
$result = mysql_query ($sql);
while ($row = mysql_fetch_row($result))
{
if ( $item == 0 ) { $_primafoto = $row[0]; }
if ( $item == 0 ) { $_primolink = "<a target='blank' href='[0].".jpg'>Ingrandisci l'immagine - Bigger size </a>";}
if ( $item == 0 ) { $_firstext = $row[1]; }
echo "photos[".$item."]=\"bn/".$row[0].".jpg\";";
echo "text[".$item."]=\"".$row[1]."\";";
echo "link[".$item."]=\"<a target='blank' href='[0].".jpg'>Ingrandisci l'immagine - Bigger size </a>\";";
$item=$item+1;
}
}
?>
function arrow()
{
document.getElementById( "back2" ).style.display = "none";
}
function changePic(dir) {
var testo = document.getElementById( 'testo' );
var collegamento = document.getElementById( 'collegamento' );
var image = document.images.photoslider,
fwdBtn = document.getElementById('forward2'),
backBtn = document.getElementById('back2'),
n = photos.length-1;
if (dir == "next") {
which = (which < n) ? which + 1 : which;
image.src = photos[which];
testo.innerHTML = text[ which ];
collegamento.innerHTML = link[ which ];
backBtn.style.display = "inline";
if (which == n) {
fwdBtn.style.display = "none";
}
} else if (dir == "back") {
which = (which > 0) ? which - 1 : which;
image.src = photos[which];
testo.innerHTML = text[ which ];
collegamento.innerHTML = link[ which ];
fwdBtn.style.display = "inline";
if (which === 0) {
backBtn.style.display = "none";
}
}
return false;
}
</script>
</head>
<body OnLoad="arrow()">
<div class="container2">
<div id="logo" > </div>
<div class="menu">
<a href=" </a>
<a href=" sono </a>
<a href=" </a>
<a href=" </a>
<a href=" </a>
<a href=" </a>
</div>
<div id="backbn">
</div>
<div id='iconesx' name="thumb">
THUMBS (HERE I WISH TO VIEW THE THUMBS!
</div>
<div class="gruppofoto2"><a href="gallerymacro.php">Macro</a><a href="gallerypaesaggi.php">Paesaggi</a><a href="galleryritratti.php">Ritratti</a><a href="gallerybn.php">Urbana e Street</a><a href="gallerynotturna.php">Notturna</a><a href="galleryanimali.php">Natura e Animali</a><a href="galleryvarie.php">Varie</a><img src="bn/<?php echo $_primafoto; ?>" name="photoslider">
<div id='testo'><?php echo $_firstext; ?></div>
<div id='collegamento'><?php echo $_primolink; ?></div>
</div>
<div class="scorri">
<a href="#" onclick="return changePic('back');"><img id="back2" style="border:0px" src="indietro.jpg"></a>
<a href="#" onclick="return changePic('next');"> <img id="forward2" style="border:0px" src="avanti.jpg"></a>
</div>
<div class="inizio"><a href="#" onclick="which=1; changePic('back');return false" >Inizio - Start</a>
</div>
<div id="footer">Created by Paolo Bergomi</div>
</div>
</body>
</html>
THIS IS THE DIV FOR THE THUMBS
<div id='iconesx' name="thumb">
THUMBS (HERE I WISH TO VIEW THE THUMBS!
</div>
Thanks a lot for everybody 's attention
paolo