Jump to content

PLEASE help roll over image issues


babyrocky1

Recommended Posts

ok here is m problem im making an online store... in the product_info.php file is see that the file it sorces from is called productimage what I think i need to do is define a second image "productimage_2" then in the product_info.php file do the java etc. and put the new productimage_2 in the images folder... BUT where and how do I define that productimage_2 is the same file name with _2 on it...

 

Is this a possible way? any help would be apreciated.

 

sorry for the horrible spelling ;)

Link to comment
https://forums.phpfreaks.com/topic/79113-please-help-roll-over-image-issues/
Share on other sites

Ok, You are making an online store ....

In your product_info.php file you keep a image called productimage, and what you want is that define (have) a second image productimage_2 and in your product_info.php page with java(script) you want a rollover image (when mouse over productimage you display productimage_2). Am I right ?

 

 

wow responces so quick LOVE YOU GUYS lol

ok ill try and explain more

 

 

the basic installation of the store has set up a file called product_info.php in there seems to be where all the information for the product pages go because i see this code

<td>
          <table border="0" cellspacing="0" cellpadding="2" align="right">
            <tr>
              <td align="center" class="smallText">
<script language="javascript"><!--
document.write('<?php echo '<a href="javascript:popupWindow(\\\'' . tep_href_link(FILENAME_POPUP_IMAGE, 'pID=' . $product_info['products_id']) . '\\\')">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], addslashes($product_info['products_name']), SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5" name="prodimg"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>');
//--></script>
<noscript>
<?php echo '<a href="' . tep_href_link(DIR_WS_IMAGES . $product_info['products_image']) . '" target="_blank">' . tep_image(DIR_WS_IMAGES . $product_info['products_image'], $product_info['products_name'], SMALL_IMAGE_WIDTH, SMALL_IMAGE_HEIGHT, 'hspace="5" vspace="5" name="prodimg"') . '<br>' . TEXT_CLICK_TO_ENLARGE . '</a>'; ?>
</noscript>
              </td>
            </tr>
          </table>

 

if i deleate this code my product image disapears so im assuming thats what it is...

 

(to get the image there in the first place I go to the admin section via firefox(mac) and upload the image as well as the info for the product BUT it only allows one image)

 

 

 

My issue is I want to make the product image into a rollover image problem is how do i do that. I figured since the online store defines the image i origanly uploaded to go with the product then maybe i can define a second image then in the product_info.php file do the rollover stuff using the productimage and the product image_2 definations (manually putting the image-2 into the image folder so the productimage_2 know what to get) so that the php would generate the images.

 

Im new new new to php (if you couldnt guess) lol thanks for the help :)

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.