Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Removing Image Borders with Javascript

    Hey all,

    Right now I have a website I am working on, dollarwisepromos.com, and I am working on an image rollover script.

    If you visit the link: http://www.dollarwisepromos.com/inde...detail&p=33137

    You will see the four images beneath the main image and it has a black border around them. I cannot find the code that sets that border.

    I'm not sure if it is a PHP issue or a javascript issue, but I'm thinking its a javascript issue.

    plugin_rollover_images.html
    Code:
    <script type="text/javascript" language="JavaScript">
    <!-- //
    	Default = new Image();
    	Default.src = "$additional[default]";
    	$additional[preload]
    	
    	function ImageRollOver (dir, id) {
    		if	(dir == 'on') { 
    			document.images.detail_image.src = eval("Image"+id+".src");
    			document.images.detail_image.width = eval("Image"+id+".width");
    			document.images.detail_image.height = eval("Image"+id+".height");
    		} else if (dir == 'off') { 
    			document.images.detail_image.src = Default.src; 
    			document.images.detail_image.width = Default.width;
    			document.images.detail_image.height = Default.height;
    		}
    	}
    //-->
    </script>
    
    <table style="border-color:#ffffff;" border="0" cellspacing="0" cellpadding="1">
    	<tr>
    		$additional[data]
    	</tr>
    </table>
    plugin_rollover_images.php
    Code:
    <?PHP
    /*
      include/plugins/plugin_rollover_images.php - 10/02/2009 - 8:24pm PST - 4.2.1
      
      SunShop Shopping Cart
      http://www.turnkeywebtools.com/sunshop/
      
      Copyright (c) 2001-2009 Turnkey Web Tools, Inc.
    */
    
    if (!defined('SS_SESSION_START')) {  
    	$abs_path = dirname(dirname(dirname(__FILE__)));
    	include_once $abs_path."/global.php";
    }
    
    $ADDON_NAME 	= "Product Detail Rollover Images";
    $ADDON_VERSION 	= "1.0";
    $CLASS_NAME 	= "rollover_images";
    
    class rollover_images {
    	var $output;
    	
    	function rollover_images ($class_vars) {
    		$this->class_vars = $class_vars;
    	}
    	
    	function render () {
    		global $DB_site, $dbprefix, $settings, $lang, $abs_path;
    		$additional = array(); $num = 1;
    		$default = $DB_site->query_first("SELECT * FROM `".$dbprefix."products` WHERE `id`='".$_GET[p]."'");
    		$additional['default'] = $settings[productpath].$default[detail_image];
    		
    		$items = $DB_site->query("SELECT * FROM `".$dbprefix."products_images` WHERE `productid`='".$_GET[p]."'");
    		while ($image = $DB_site->fetch_assoc($items)) {
    			include_once $abs_path."/include/classes/class.imageresize.php";
    			$simulate = new image_resize();
    			$simulate->resize($abs_path.'/'.$settings[productpath].$image[large_image], $settings['auto_detail_height'], $settings['auto_detail_width'], false);
    			
    			$additional[preload] .= 'Image'.$image[id].' = new Image('.$simulate->rdata[new_w].','.$simulate->rdata[new_h].');'."\n".'Image'.$image[id].'.src = "'.$settings[shopurl].'include/plugins/plugin_rollover_images.php?img='.$image[id].'&w='.$settings['auto_detail_width'].'&h='.$settings['auto_detail_height'].'"'."\n";
    			$additional[data] .= template('plugin_rollover_images_item.html', array('image' => array('product' => $_GET[p], 'location' => $settings[shopurl].'include/plugins/plugin_rollover_images.php?img='.$image[id].'&amp;w='.$this->class_vars[max_width].'&amp;h='.$this->class_vars[max_height], 'size' => '', 'id' => $image[id])));
    			
    			if ($num == $this->class_vars[number]) { $additional[data] .= "\n</tr><tr>\n"; $num = 1; } else $num++;
    		}
    		
    		return template('plugin_rollover_images.html', array('additional' => $additional));
    	}
    	
    	function install () {
    		global $DB_site, $dbprefix;
    		$DB_site->query("INSERT INTO ".$dbprefix."modules_plugins set `module`='rollover_images', `internalname`='enabled', `name`='Enabled', `moptions`='', `options`='0::1->Off::On', `value`='1', `help`='', `size`='0', `dorder`='1', `field_type`='dropdown'");
    		$DB_site->query("INSERT INTO ".$dbprefix."modules_plugins set `module`='rollover_images', `internalname`='number', `name`='Images Per Row', `moptions`='', `options`='', `value`='3', `help`='', `size`='3', `dorder`='2', `field_type`='textbox'");
    		$DB_site->query("INSERT INTO ".$dbprefix."modules_plugins set `module`='rollover_images', `internalname`='max_width', `name`='Maximum Thumb Width', `moptions`='', `options`='', `value`='75', `help`='', `size`='3', `dorder`='3', `field_type`='textbox'");
    		$DB_site->query("INSERT INTO ".$dbprefix."modules_plugins set `module`='rollover_images', `internalname`='max_height', `name`='Maximum Thumb Height', `moptions`='', `options`='', `value`='75', `help`='', `size`='3', `dorder`='4', `field_type`='textbox'");
    	}
    	
    	function uninstall () {
    		global $DB_site, $dbprefix;
    		$DB_site->query("DELETE FROM ".$dbprefix."modules_plugins where `module`='rollover_images'");
    	}
    }
    
    if (is_numeric($_GET[img]) && is_numeric($_GET[w]) && is_numeric($_GET[h])) {
    	$image = $DB_site->query_first("SELECT * FROM `".$dbprefix."products_images` WHERE `id`='".$_GET[img]."'");
    	include_once $abs_path."/include/classes/class.imageresize.php";
    	$resize = new image_resize();
    	$resize->resize_and_display($abs_path.'/'.$settings[productpath].$image[large_image], $_GET['h'], $_GET['w']);
    	exit;
    } 
    ?>

  • #2
    New Coder
    Join Date
    Aug 2009
    Posts
    94
    Thanks
    0
    Thanked 16 Times in 16 Posts
    This the image tag that you have

    Code:
    <img border="0" alt="" style="border: 1px solid rgb(0, 0, 0);" src="http://www.dollarwisepromos.com/include/plugins/plugin_rollover_images.php?img=18&amp;w=75&amp;h=75">
    You have attribute given border as 1px solid. Remove it


    Code:
    <img border="0" alt=""  src="http://www.dollarwisepromos.com/include/plugins/plugin_rollover_images.php?img=18&amp;w=75&amp;h=75">

  • #3
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by jolly_nikki View Post
    This the image tag that you have

    Code:
    <img border="0" alt="" style="border: 1px solid rgb(0, 0, 0);" src="http://www.dollarwisepromos.com/include/plugins/plugin_rollover_images.php?img=18&amp;w=75&amp;h=75">
    You have attribute given border as 1px solid. Remove it


    Code:
    <img border="0" alt=""  src="http://www.dollarwisepromos.com/include/plugins/plugin_rollover_images.php?img=18&amp;w=75&amp;h=75">
    Where are you seeing this code? It's not in any of the code I posted.

  • #4
    Regular Coder low tech's Avatar
    Join Date
    Dec 2009
    Posts
    851
    Thanks
    172
    Thanked 93 Times in 93 Posts
    It's in your HTML, in your table where your images are placed.

  • #5
    New to the CF scene
    Join Date
    Aug 2010
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    That code is dynamically generated somehow, I cannot find that that anywhere in the source code.

  • #6
    New Coder
    Join Date
    Jul 2010
    Posts
    37
    Thanks
    17
    Thanked 0 Times in 0 Posts
    Do you have a web editor like Dreamweaver? If so just CTRL+F search your source code in all local file copies for all instances of "1px solid". Something has to putting it there.
    Last edited by rettgoings; 08-24-2010 at 03:30 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •