Easy Address logo Easy Address logo
www.easyaddress.net
Welcom to your website source!
Easy Address is a template based website management system.
that provides their customers with complete control over the design and content of their website.
Login to your account.
Username:
Password:
forgot my password
features included in all accounts
Web management control panel and proffessional website designs
web hosting and pop email
See all features included in our website plans.
Customer testimony
submit a comment to our support team.
Menu LinksHome PageLog in to web mailDomain registrar and domain informationcontact our support staffview frequently asked questions
 
 
 
 
www.
.
church website featureschurch website showcasewebsite pricesbecome an affiliateAbout our company
FAQ and Support
SUPPORT
ActiveKB Knowledgebase
FAQ Support Home Page > Page Builder | Submit a Comment

Search the Knowledge Base Browse by Category
Is it possible to place random images on a web page?

Would you like to...

Print this page
Email this to a friend

It is possible to place random images & text on a webpage, but it will require the insertion of some JavaScript.  Here’s how to do it:

  1. Log into your administrative control panel
  2. edit the web page that you would like to modify (i.e. the “Home” page)
  3. when Page Builder displays your page click on the “source” tab at the bottom of the page
  4. Copy the code - when working with source code it it’s a good idea to copy the HTML and paste it into Note Pad or your favorite word processor.  If the code becomes corrupted you can always go back to the original
  5. Place the JavaScript into the area that you want the random image displayed.  You may want to experiment with the code first by placing it at the beginning of your HTML code.
  6. Click the Preview tab to preview the effects of the JavaScript.

Here is the JavaScript for random images.  You can use the images in the code for testing and replace them with images you upload into your website:

<script language="JavaScript"><!--
 images = new Array(4);
 images[0] = "<a href = 'http://www.computerhope.com/index.htm'><img src='http://www.computerhope.com/banners/banner.gif' alt='Visit Computer Hope'></a>";
 images[1] = "<a href = 'http://www.computerhope.com/history/index.htm'><img src='http://www.computerhope.com/banners/banner2.gif' alt='Computer History'></a>";
 images[2] = "<a href = 'http://www.computerhope.com/index.htm'><img src='http://www.computerhope.com/banners/banner3.gif' alt='Visit Computer Hope'></a>";
 images[3] = "<a href = 'http://www.computerhope.com/history/newslet.htm'><img src='http://www.computerhope.com/banners/banner5.gif' alt='Computer Hope Newsletter'></a>";
index = Math.floor(Math.random() * images.length);
document.write("<DL>\n");
document.write("<DT>" + "" + images[index] + "\n");
document.write("</DL>\n");
// --></script>

Here is JavaScript for random text:

<script language="JavaScript"><!--
 text = new Array(4);
 text[0] = "Text 1";
 text[1] = "Text 2";
 text[2] = "Text 3";
 text[3] = "Text 4";
index = Math.floor(Math.random() * text.length);
document.write("<DL>\n");
document.write("<DT>" + "" + text[index] + "\n");
document.write("</DL>\n");
// --></script>


Related Questions:

Attachments:

No attachments were found.
Easy Address, Inc. Copyright © 2010. 
All rights reserved.
I forgot my password View website features Submit a comment