View Single Post
Old 01-07-2005, 10:26 PM   #5 (permalink)
arch13
Loves my girl in thongs
 
arch13's Avatar
 
Location: North of Mexico, South of Canada
Quote:
Originally Posted by theFez
» is not a string concatenation operator. yank that from your javascript code and it should work.
hmmm. that both works and doesn't now.
Your right, that >> was screwing it up.

Now that I pulled it, when I click on the image, it swaps into the right table. But then the page auto-refreshes to the image itself.

I have no idea why it's doing that. Did I create something somewhere that is causing this?
Maybe I should just post the page source to make it easier:
As you can see, I changed the script to pull the >> tags. Is the class=popimage cuasing the page to refresh to just the image instead of the image in the table swapped?

Code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" language="javascript">
function showPic (whichpic) {
 if (document.getElementById) {
  document.getElementById('placeholder')
  .src = whichpic.href;
  if (whichpic.title) {
   document.getElementById('desc')
  .childNodes[0].nodeValue = whichpic.title;
  } else {
   document.getElementById('desc')
  .childNodes[0].nodeValue = whichpic.childNodes[0].nodeValue;
  }
  return false;
 } else {
  return true;
 }
}
</script>
</head>

<body onLoad="MM_preloadImages('splash/boiler_splash.JPG')">
<table height="114" border="0" cellpadding="0" cellspacing="0"><!--DWLayoutTable-->
  <tr> 
    <td width="201" bgcolor="#999999" class="navbars" cellpadding="0" cellspacing="0"><div align="center">
	<?php

# PopUp! Gallery, a basic and configurable PHP script
# to display javascript pop-up picture galleries on the web.
# - By Matthew Blake (http://www.darkhighway.net)
# - Download source at http://www.darkhighway.net/PopUpGallery/
# Special thanks to ninebirds from DevShed for helping with sort issue
#####################################################################
# This program utilizes aspects of the following scripts:
# JK Pop up image viewer script- by JavaScriptKit.com
# --- Visit JavaScript Kit (http://javascriptkit.com)
# --- for free JavaScript tutorials and scripts
# PHPphotoAlbum 1.0 - by Daniele Leone (info@danieleleone.com)
# --- Download available at http://www.danieleleone.com/
# Disable right click script III- By Renigade (renigade@mediaone.net)
# --- For full source code, visit http://www.dynamicdrive.com
#####################################################################

include("test/_vars.php");
echo "<!--BEGIN PopUp Gallery -->"."\n";
echo "<style type='text/css'>IMG.popimage { border: $thumb_border; }</style>"."\n";
$files = array ();
$myDirectory = opendir("imgs/thumbs");
echo "\n";
echo "<table width=$table_width bgcolor='$table_bg_color' border='$table_border' cellpadding='$cell_padding' cellspacing='0'>"."\n";
echo "<tr>"."\n";
while ($file = readdir($myDirectory)) {
	if (($file != ".") && ($file != "..") && ($file != "index.php") && !(is_dir("imgs/$file")) )
	{
	$files[] = $file;
	}
}
sort($files);
for ($i = 0; $i < count($files); $i++)
{  
  $file = $files[$i];
	if (is_int(($i + 1) / $cols))
	{
	list($width, $height) = getimagesize("imgs/$file"); 
	echo "<td align='center' >";?><a onClick="return showPic(this)" href="imgs/<?php echo $file;?>"><? echo "<img src='imgs/thumbs/$file' class='popimage'></a></td>"."\n";
	echo "</tr><tr>"."\n";
	}
	else
	{
list($width, $height, $type, $attr) = getimagesize("imgs/$file");   
echo "<td align='center'>";?><a onClick="return showPic(this)" href="imgs/<?php echo $file;?>"><? echo "<img src='imgs/thumbs/$file' class='popimage'></a></td>"."\n";
	}
}
echo "</tr>"."\n";
echo "</table>"."\n";
echo "<!--END PopUp Gallery -->"."\n";
closedir($myDirectory);
?>

      </div></td>
    <td width="439" height="25" bgcolor="#999999" class="navbars" cellpadding="0" cellspacing="0"><div align="center"><img id="placeholder" src="/splash/boiler_splash.jpg" alt="" /></div></td>
	</tr>
</table>
</body>
</html>
__________________
Seen on an employer evaluation:

"The wheel is turning but the hamsters dead"
____________________________
Is arch13 really a porn diety ? find out after the film at 11.
-Nanofever
arch13 is offline  
 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37