Jump to content

Jago6060

Members
  • Posts

    116
  • Joined

  • Last visited

    Never

Everything posted by Jago6060

  1. I've defined a div that is supposed to just display a background image. the image is a gif file that I've made transparent with Photoshop. heres the code... #trans { background-image:url(rotarytrans3.gif); background-attachment: fixed; background-position: center center; background-repeat: no-repeat; height: 300px; width: 300px; float: right; } am I missing something?
  2. I'm sure there are people out there who'd disagree with me on this but I think using PHP would be a good idea. Mostly because with PHP you can write a snippet of code one time and propogate it to as many users as you need to. All you'd need is someone who really knows how to work PHP and an accompanying database.
  3. I checked the site on IE and FF, both windows versions and it looks identical.
  4. I'm sure this question comes up alot but the site im working comes up fine in IE but gets totally butchered in Firefox..is there any "simple way" to fix this?(NOTE: <DOCTYPE> is currently in quirks mode.)
  5. thank you sooooo much! that works just like I need it to. now my next issue is this. when the images enlarge they push everything else out of the way. is there anyway to allow them to just overlap the other images? and also, is there anyway to preserve the image proportions when doing a rollover enlarge?
  6. I still can't seem to get it to work. heres the most recent version I've come up with. $d1=mysql_result($result,$i,"img_id"); $d2=mysql_result($result,$i,"img_dir"); $img_dim = getimagesize($d2); $width = ($img_dim[0]); $height = ($img_dim[1]); $count = 0; do {$count++; $width = ($img_dim[0]/$count); $height = ($img_dim[1]/$count); } while (($width > 75) && ($height > 75)); echo " <script language = \"Javascript\" type = \"text/javascript\"> var imgId = ".addslashes($d1)."; function imgEnlarge(){ document.getElementById(imgId).height += 100; document.getElementById(imgId).width += 100; } function imgShrink(){ document.getElementById(imgId).height -= 100; document.getElementById(imgId).width -= 100; } </script> "; echo "<td><a href=$d2><center><img src=$d2 id=imgId border=0 width=$width height=$height onmouseover=imgEnlarge() onmouseout=imgShrink()></center></a></td>";
  7. I want to create a popup window on a single page that is fixed to the left side tat displays the images on the page when you rollover them(just a single image shown at a time). Is this possible? if so can anyone help get me started?
  8. I fixed all that stuff and the rollovers still won't work. I think the issue is getting the $d1 variable into the javascript function but I dunno how to fix it.
  9. I'm trying to use the values from my PHP variables in my javascript functions in order to control the image rollover sizing, heres my code. $d1=mysql_result($result,$i,"img_id"); $d2=mysql_result($result,$i,"img_dir"); $img_dim = getimagesize($d2); $num_img = array(1=>'128','176','320','352','550','640','704','720','768','800','1024'); $width = ($img_dim[0]); $height = ($img_dim[1]); $count = 0; do {$count++; $width = ($img_dim[0]/$count); $height = ($img_dim[1]/$count); } while (($width > 75) && ($height > 75)); echo " <script language = \"Javascript\" type = \"text/javascript\"> var elemId = addslashes($d1); var imgHeight = addslashes($height); var imgWidth = addslashes($width); function imgEnlarge(){ document.getElementById(\'elemId\').height += imgHeight document.getElementById(\'elemId\').width += imgWidth } function imgShrink(){ document.getElementById(\'elemId\').height -= imgHeight document.getElementById(\'elemId\').width -= imgWidth } </script> "; echo "<td><a href=$d2><img src=$d2 id=elemId border=0 width=$width height=$height onmouseover=imgEnlarge() onmouseout=imgShrink()></a></td>"; any ideas?
  10. i have some image rollovers working on my webpage, but i was wondering if it were possible to somehow constrain the direction in which the image grows. heres the webpage(so you can see what my issue is) http://www.caironewyorkrotary.org
  11. you could try finding a javascript fucntion that says something like "on unLoad....session_destroy()". Or you could create a small php script that gets run when the form is submitted. So you'd have your "form_page"->"form_submission_page(mysql or whatever)"->"session_destroy_page"->"home_page"
  12. oops, yeah sorry I forgot to list the issue. When the images appear on the screen, the functions don't work. but I have the exact same functions on my local computer that work. I think it's how I have the PHP image echo line setup but I'm not sure. I guess I kind of need a second set of eyes to see whats wrong.
  13. I'm have my project setup to pull images from a database and display them on the screen with some basic JavaScript functions. I get the images to come up but I can't get the javasccript functions to work on those images. heres my functions... <script language = "Javascript" type = "text/javascript"> function imgEnlarge(){ document.getElementById('img').height += 100 document.getElementById('img').width += 100 } function imgShrink(){ document.getElementById('img').height -= 100 document.getElementById('img').width -= 100 } </script> heres my PHP that displays the images... <? include 'connect.php'; $tdcount = 0; @mysql_select_db($database) or die( "Unable to select database"); $sql = "SELECT * FROM crc_images"; $result=mysql_query($sql); $num=mysql_numrows($result); mysql_close(); echo "<table border=0 align=center cellspacing=10 cellpadding=10><tr>"; $i=0; while ($i < $num) { $d1=mysql_result($result,$i,"img_id"); $d2=mysql_result($result,$i,"img_dir"); $img_dim = getimagesize($d2); $num_img = array(1=>'128','176','320','352','550','640','704','720','768','800','1024'); $width = ($img_dim[0]); $height = ($img_dim[1]); $count = 0; do {$count++; $width = ($img_dim[0]/$count); $height = ($img_dim[1]/$count); } while (($width > 75) && ($height > 75)); echo "<td><a href=$d2><img src=$d2 id=\"img\" border=0 width=$width height=$height onmouseover=\"imgEnlarge\" onmouseout=\"imgShrink\"></a></td>"; $tdcount++; $i++; if ($tdcount == 4){ echo "</tr>"; $tdcount = 0; } } echo "</table>"; ?> PLEASE HELP ASAP, it would be greatly appreciated!!!
  14. I'm trying to pull images from a database and apply some JavaScript functions to them(mouseovers). here is the code I have. my functions... <script language = "Javascript" type = "text/javascript"> function imgEnlarge(){ document.getElementById('img').height += 100 document.getElementById('img').width += 100 } function imgShrink(){ document.getElementById('img').height -= 100 document.getElementById('img').width -= 100 } </script> and heres my php... <? include 'connect.php'; $tdcount = 0; @mysql_select_db($database) or die( "Unable to select database"); $sql = "SELECT * FROM images"; $result=mysql_query($sql); $num=mysql_numrows($result); mysql_close(); echo "<table border=0 align=center cellspacing=10 cellpadding=10><tr>"; $i=0; while ($i < $num) { $d1=mysql_result($result,$i,"id"); $d2=mysql_result($result,$i,"dir"); $img_dim = getimagesize($d2); $num_img = array(1=>'128','176','320','352','550','640','704','720','768','800','1024'); $width = ($img_dim[0]); $height = ($img_dim[1]); $count = 0; do {$count++; $width = ($img_dim[0]/$count); $height = ($img_dim[1]/$count); } while (($width > 75) && ($height > 75)); echo "<td><a href=$d2><img src=$d2 id=img border=0 width=$width height=$height onmouseover=imgEnlarge onmouseout=imgShrink></a></td>"; $tdcount++; $i++; if ($tdcount == 4){ echo "</tr>"; $tdcount = 0; } } echo "</table>"; ?>
  15. I'm having some issues with the cooperation of PHP and MySQL. I'm trying to have a single script perform the upload fuction, access the database, and put a record into my images table. So far it'll just upload the image but I can't seem to get it to put anything into the database. any suggestions? this is my upload.php <? session_start(); include 'connect.php'; $sql = "insert into crc_images (img_id,img_dir)values('1','$_POST[uploadedfile]')"; // Where the file is going to be placed $target_path = "./uploads/images/"; /* Add the original filename to our target path. Result is "uploads/filename.extension" */ $target_path = $target_path . basename( $_FILES['uploadedfile']['name']); $_FILES['uploadedfile']['tmp_name']; if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) { echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded"; }else{ echo "There was an error uploading the file, please try again!"; } ?>
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.