Home > User Guide

How to Use an External Image to Change an Image on Your Webpage when onClick, onMouseOver or onMouseout?

Below is the result we want to achieve through SliceMaker products:

When you click the Windows icon, the big image above will become to the windows big image. On the other hand, when you click the Mac icon, the big image above will become to the Mac big image:

                             [View the Demo]                     [Download the Demo]

 

Now, I will show you how to achieve the above result with SliceMaker products.

Note: To keep this tutorial to a reasonable length, we will only show you how to change the big image to the Windows big image when we click the Windows icon. The same way can be used to change the big image to the Mac big image when we click the Mac icon.

 

 

 

 Step 1: Select a Slice to Trigger the onClick Event

 

Because when we click the Windows icon, the above big image will be changed to the Windows image, so we should select the slice that contains the Windows icon to trigger the onClick event.

 


 Step 2: Choose an Event - onClick, onMouseOver or onMouseOut

Here we will choose onClick event.

 

 

onMouseOver event here will determine when your mouse hovers over the Windows icon, the above big image will be changed to the Windows image.

onClick event here will determine when your mouse clicks the Windows icon, the above big image will be changed to the Windows image.

onMouseOut event here will determine when your mouse moves away from the Windows icon, the above big image will be changed to the Windows image.

 

 

 Step 3: Click the Add Button to Choose the Corresponding JavaScript Effect

 

 

 Step 4: Select the Image that You Want the above Big Image to Change to

After clicking the JavaScript Effect -  , a dialog box will appear asking us to select a slice that contains the above big image.

 

Here, we will select No. 2 slice because No.2 slice contains the big image part.

 

 

After click the confirm button, another dialog box will appear asking us to select an image. The selected image will be used to change the big image within No.2 slice when onClick.

 

Here, we will select the Windows image:

 

 

Note:

1) Please firstly prepare the big Windows image which has nearly the same size as the big Mac image.

2) Please save the Windows image you prepared to the Website Root Directory or its sub directory youve set through SliceMaker products.

 

 

 Step 5: Generate the Project

 

After generating the project, you will immediately view the above result through the built-in previewer of SliceMaker products.

 

 

 

 Contact Us for Help

If you cannot find a proper solution to your issue through the above methods, our support team is always on standby for whatever problems youve got. We promise to you we will deal with your issues within 24 hours. Contact Our Support Team

 

 

Whats Next:



Choose a SliceMaker Product to Create a Website on Your Own-30 Day Freetrial
SliceMaker Standard V3.6 - Freeware
The anyone-can-master webpage making software. You can create exceptional webpage/website on your own even if you're unfamiliar with webpage making.
$0
$0
SliceMaker Platinum V3.6 - Freeware
The bestselling webpage making software, helps you create exceptional webpage/website without writing complicated CSS and DIV codes.
$0
$0
SliceMaker Deluxe V3.6 - Freeware
The all-in-one webpage making software, helps you create webpage/website of any style. It's the idea tool to create webpage/website.
$0
$0