|
|
<─ Random image | |
| <─ Matching caption | ||
| How to Make a Photo (with a Matching Caption) Change Each Time Your
Page is Refreshed PART I Open the code to your webpage and paste the following Javascript into your page below the TITLE line in your code (you will recognize it because it starts with <title> and ends with </title>). Once you have pasted this code in the page ... you will have to open the code and edit the lines starting with theImages[0] to point to your images. You can see I have all my images in a folder called "photos" and name my images using numbers (for ease of tracking.)
Don't edit any of the code except the section between the lines. You can easily change the number of images ... by simply adding more theImages[x] and theText[x] and continue number sequentially from "0" or reduce the number of images by deleting some (be sure to leave them consecutively numbered!) Now all you have to do is to create your images, name them the same as you listed in your code and place them in a folder called "photos". (Or write the code to point to any folder you want to use for the images.) PART II - Showing the IMAGE Now to get an image to show you will have to place the following on your page while in the normal editing view. Click on the page where you want the image to go. Go to INSERT … drag down to WEB COMPONENT In the dialog box … drag down to the bottom to ADVANCED CONTROLS Click on ADVANCED CONTROLS and on the right click on HTML Click the FINISH button You will now have an empty “HTML Markup” box. Paste the following into the box.
Click OK. You will now see a yellow square with “<?>” written in it. This yellow square will appear as a RANDOM PICTURE when you view the page on the web. PART II - Showing the TEXT Now to get the text to show you will have to place the following on your page while in the normal editing view. Go to the line below the image (yellow square with "<?>".) Go to INSERT … drag down to WEB COMPONENT In the dialog box … drag down to the bottom to ADVANCED CONTROLS Click on ADVANCED CONTROLS and on the right click on HTML Click the FINISH button You will now have an empty “HTML Markup” box. Paste the following into the box.
Click OK. You will now see a SECOND yellow square with “<?>” written in it. This yellow square will appear as the matching text for the image when you view the page on the web.
|