M.Paaske Posted August 16, 2008 Share Posted August 16, 2008 Hey all, I have once posted a thread but trying again to maybe get the last help I need on my gallery script.. To exactly explain what I want: I want small pictures (thumbnails) which links to a div box in the same window, not by opening another window.. I want the small thumbs to open a big version of the picture in a div box, not an iframe since that pretty much ruined the picture some how. I have almost finished the script but I'm stuck and need help spotting the, probably, little mistake I've made: -------------------------------------------------------------------------------------------------------------- <?php phpinfo(); $connect = mysql_pconnect("HIDDEN","HIDDEN","HIDDEN")or die("cant connect "mysql_error()); $db = mysql_select_db("HIDDEN")or die("connecter ikk til DB "(mysql_error()); $sql = mysql_query("SELECT * FROM `galleri` limit 0,5"); while($myrow = mysql_fetch_array($sql)){ echo"test"; echo"<a href='gallery_test.php?ID=".$myrow['ID']."'> <img src='Uploaded_billeder/thumb/".$myrow['filename']."'>[/url]"; } if($_GET['ID']){ $sql = mysql_query("SELECT * FROM `galleri` where ID =".$_GET['ID']."") $bigmama = mysql_fetch_array($sql); echo"<div style='position: relative; height: auto; width: auto;'> <img src='Uploaded_billeder/".$bigmama['filename']."'> </div>"; } mysql_close($connect); ?> ---------------------------------------------------------------------------------------------------- Been troubling with this for weeks... Would grant the hero with the answer with lots of thanks Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted August 16, 2008 Share Posted August 16, 2008 If you want it to happen without a page refresh your going to have to look into a client side language, such as JavaScript. Quote Link to comment Share on other sites More sharing options...
M.Paaske Posted August 16, 2008 Author Share Posted August 16, 2008 Really ? no possible way in just pure html? Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted August 16, 2008 Share Posted August 16, 2008 Really ? no possible way in just pure html? Nope, unless you want to use an Iframe, which technically uses a page refresh. Quote Link to comment Share on other sites More sharing options...
M.Paaske Posted August 16, 2008 Author Share Posted August 16, 2008 Hmm okay thanks for info^^ But the problem I had with iframe was that... First of all I couldn't center the image in the iframe, and second, people could click the iframe to zoom in on the picture and that pretty much (eventually) made the picture dissapear! Quote Link to comment Share on other sites More sharing options...
pocobueno1388 Posted August 16, 2008 Share Posted August 16, 2008 Just search google for "javascript image gallery", I'm sure you will come up with plenty for what your looking for. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.