I enclosed the entire coded page of the page I am having a problem on. The Image and Link rotation are working, but I can't get the image to appear in the correct place on the page (I noted on the page with the copy IMAGE AND LINK HERE where it should be).
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<meta name="GENERATOR" content="PageBreeze Free HTML Editor (http://www.pagebreeze.com)">
<meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1" >
<title>Ridgewood Newcomers</title>
<style>
<!--
h1 { font-family: Arial, sans-serif; font-size: 30px; }
h2 { font-family: Arial, sans-serif; font-size: 18px; }
body,p,b,i,em,dt,dd,dl,sl,caption,th,td,tr,u,blink,select,option,form,div,li { font-family: Arial, sans-serif; font-size: 12px; }
-->
</style>
<script language="JavaScript">
btn1_on = new Image(); btn1_on.src = "images/nav_home.gif";
btn1_off = new Image(); btn1_off.src = "images/nav_home_onclick.gif";
btn2_on = new Image(); btn2_on.src = "images/nav_about_us.gif";
btn2_off = new Image(); btn2_off.src = "images/nav_about_us_onclick.gif";
btn3_on = new Image(); btn3_on.src = "images/nav_calendar.gif";
btn3_off = new Image(); btn3_off.src = "images/nav_calendar_onclick.gif";
btn4_on = new Image(); btn4_on.src = "images/nav_special_interest.gif";
btn4_off = new Image(); btn4_off.src = "images/nav_special_interest_onclick.gif";
btn5_on = new Image(); btn5_on.src = "images/nav_resources.gif";
btn5_off = new Image(); btn5_off.src = "images/nav_resources_onclick.gif";
btn6_on = new Image(); btn6_on.src = "images/nav_join_us.gif";
btn6_off = new Image(); btn6_off.src = "images/nav_join_us_onclick.gif";
function imageOn(name){
document.images[name].src = eval(name + '_off.src');
}
function imageOff(name){
document.images[name].src = eval(name + '_on.src');
}
</script>
<SCRIPT language=JavaScript>
var img_width = "468";
var img_height = "60";
var img_title = "Click Here";
var ad=new Array()
ad[0]='trendy_baby_ad.gif';
ad[1]='ad_2.gif';
ad[2]='ad_3.gif';
var links=new Array()
links[0]='http://www.thetrendybebe.com';
links[1]='http://www.citizensbank.com';
links[2]='http://www.ethos.com';
var xy=Math.floor(Math.random()*ad.length);
document.write('<a href="'+links[xy]+'" target="_blank"><img src="'+ad[xy]+'" width="'+img_width+'" height="'+img_height+'" alt="'+img_title+'"></a>');
</SCRIPT>
</head>
<div align="center"><body bgcolor="#FFFFFF" link="#000000" vlink="#000000" alink="#000000">
<a name="top"></a>
<table width="778" border="0" cellspacing="0" cellpadding="0" bgcolor="#260751">
<tr>
<td><img src="images/top_banner_left.gif" alt="" width="208" height="76" border="0"></td>
<td><font color="#FFFFFF">IMAGE AND LINK HERE</font></td>
<td><img src="images/top_banner_right.gif" alt="" width="101" height="75" border="0"></td>
</tr>
<tr>
<td colspan="3" valign="top"><img src="images/top_banner_middle.gif" alt="" width="777" height="14" border="0"></td>
</tr>
</table>
<table cellspacing="0" cellpadding="0">
<tr>
<td><a href="index.html" onMouseOver="imageOn('btn1')" onMouseOut="imageOff('btn1')"><img src="images/nav_home.gif" alt="" width="129" height="27" border="0" name="btn1"></a></td>
<td><img src="images/nav_about_us_onclick.gif" alt="" width="124" height="27" border="0" name="btn2"></td>
<td><a href="calendar.html" onMouseOver="imageOn('btn3')" onMouseOut="imageOff('btn3')"><img src="images/nav_calendar.gif" alt="" width="127" height="27" border="0" name="btn3"></a></td>
<td><a href="special_interest.html" onMouseOver="imageOn('btn4')" onMouseOut="imageOff('btn4')"><img src="images/nav_special_interest.gif" alt="" width="125" height="27" border="0" name="btn4"></a></td>
<td><a href="resources.html" onMouseOver="imageOn('btn5')" onMouseOut="imageOff('btn5')"><img src="images/nav_resources.gif" alt="" width="127" height="27" border="0" name="btn5"></a></td>
<td><a href="join_us.html" onMouseOver="imageOn('btn6')" onMouseOut="imageOff('btn6')"><img src="images/nav_join_us.gif" alt="" width="146" height="27" border="0" name="btn6"></a></td>
</tr>
</table>
<br>
<table width="777" border="0">
<tr>
<td width="150" valign="top">
<font size="2" color="#000000"><BR>
<a href="#board">2006-07 Board</a><br><BR>
<a href="#fundraising">Fundraising Efforts</a><BR><BR>
<a href="#friends">First Friends</a><BR><BR>
<a href="#childcare">Childcare During Luncheons</a><BR><BR>
<a href="#referral">Newcomer Referral<BR>Service</a><BR><BR>
<a href="#neat">Newcomers Emergency<BR>Assistance Team (NEAT)</a><BR><BR>
</font>
</td>
<td><table border="0" cellpadding="20"><tr><td valign="top">
<h2>About Us</h2>
The Ridgewood Newcomers Club is a program of the YWCA of Bergen County. For over 50 years, our club has been bringing new residents in the community together for friendship and fun. With a membership of more than 300 families, Newcomers is a great way to meet people and get involved in the community. Newcomers is run exclusively by volunteers who have recently moved to the area. Each year, Newcomers hosts a wide variety of activities and events aimed at the diverse interests of our membership. In addition to monthly luncheons, Newcomers also supports over 15 interest groups which include wine & cheese parties, book groups, playgroups, and gourmet club. Plus, there are groups organized for husbands and Ex-Pats/Re-Pats. Just recently we added a new interest group called "Little Newcomers," which organizes local outings for parents and children to enjoy together. There is truly something for everyone! Newcomers hosts a new member reception every summer, but residents in the Ridgewood area can join Newcomers at anytime during the year. There really isn't an easier way to make new friends, get to know a wonderful community and have lots of fun in the process! Please give us a call!
<BR><BR><a href="#top">Back to top</a><br><BR>
<a name="board"></a>
<h2>2006-2007 Board</h2>
<table width="550" border="0">
<tr valign="top">
<td>President</td><td>Winnie Atterbury O'Keefe<BR><BR></td></tr>
<tr valign="top"><td>1st Vice President</td><td>Alicia Simone<BR><BR></td></tr>
<tr valign="top"><td>Treasurer</td><td>Ann Addiego<BR><BR></td></tr>
<tr valign="top"><td>Secretary</td><td>Vanessa Druckman<BR><BR></td></tr>
<tr valign="top"><td>Past President</td><td>Cheryl Post<BR><BR></td></tr>
<tr valign="top"><td>Afternoon Socials - 2nd Vice President</td><td>Anita Srivastava</td></tr>
<tr valign="top"><td> </td><td>Caroline Taylor</td></tr>
<tr valign="top"><td> </td><td>Laura Cohan<BR><BR></td></tr>
<tr valign="top"><td>Evening Socials - 3rd Vice President</td><td>Jill Sullivan</td></tr>
<tr valign="top"><td> </td><td>Eileen Seaman</td></tr>
<tr valign="top"><td> </td><td>Liz Aktar<BR><BR></td></tr>
<tr valign="top"><td>Family Fun - 4th Vice President</td><td>Michelle Anderson</td></tr>
<tr valign="top"><td> </td><td>Nicole Liu</td></tr>
<tr valign="top"><td> </td><td>Maggie McCormick<BR><BR></td></tr>
<tr valign="top"><td>Membership</td><td>Joy Scott<BR><BR></td></tr>
<tr valign="top"><td>Publicity</td><td>Paige McElroy<BR><BR></td></tr>
<tr valign="top"><td>Interest Groups</td><td>Cynthia Rae<BR><BR></td></tr>
<tr valign="top"><td>Hospitality</td><td>Mary Dougherty</td></tr>
<tr valign="top"><td> </td><td>Cecily Healy<BR><BR></td></tr>
<tr valign="top"><td>Ways & Means</td><td>Laurie Carr</td></tr>
<tr valign="top"><td> </td><td>Silvana Penava<BR><BR></td></tr>
<tr valign="top"><td>Newsletter</td><td>Deanne Dunne</td></tr>
<tr valign="top"><td> </td><td>Lucy Probert<BR><BR></td></tr>
<tr valign="top"><td>Communications</td><td>Carol Cho<BR><BR></td></tr>
<tr valign="top"><td>Member Services</td><td>Kumiko Suzuki<BR><BR></td></tr>
<tr valign="top"><td>YWCA Advisor</td><td>Joan Groome<BR><BR></td></tr>
<tr valign="top"><td>Nominating</td><td>Christine McCandless</td></tr>
<tr valign="top"><td> </td><td>Victoria Schnure<BR><BR></td></tr>
<tr valign="top"><td>Fundraising</td><td>Isabelle Leluc</td></tr>
<tr valign="top"><td> </td><td>Christina Gibbons<BR><BR></td></tr>
</table>
<a href="#top">Back to top</a><br><BR>
<a name="fundraising"></a>
<h2>Fundraising Efforts</h2>
As an integral part of the YWCA and the Ridgewood community, the Newcomers Club of Ridgewood raises thousands of dollars each year for the the YWCA. Throughout the year, the Newcomers' Club hosts several fundraising events, big and small, for which the proceeds go to the YWCA's Encore Plus program and YWCA Rape Crisis Center. Most recently, fundraising events have included, Casino Night, Newcomers' Cookbook, Superbowl Squares, Fashion Shows, Art Show and Auction. The Newcomers' Club also supports the YWCA's annual Travels and Treasure Auction with donations; past donations have been crafts, home made dinners and fine wines.
<BR><BR><a href="#top">Back to top</a><br><BR>
<a name="friends"></a>
<h2>First Friends</h2>
First Friends is a service provided to connect first-year Newcomers with an "experienced" Newcomer with common experiences (e.g., living in the same neighborhood, moved from the same town, having children the same ages, etc.). A First Friend can help introduce you to the area, answer questions about the Newcomers organization, suggest places to go and things to do. To sign up, contact Mary Dougherty or Cecily Healy.
<BR><BR><a href="#top">Back to top</a><br><BR>
<a name="childcare"></a>
<h2>Child Care During Afternoon Luncheon Programs</h2>
Child Care is available at the YWCA (112 Oak St., Ridgewood) for all afternoon Newcomers luncheon programs at the YWCA. Reservations must be made no later than the Friday prior to each program and are on a first-come, first-served basis. You must pay for reservations unless you cancel by noon on the Tuesday prior to the program. Child Care begins at 12:30 p.m. (Note: Children will not be accepted after 1:00 p.m.) Costs are as follows:<BR>
<ul type="circle">
<li>$5.00 for Infant Care (2 months to 2-1/2 years)</li>
<li>$3.50 for the first child in Playtime (2-1/2 to 6 years)</li>
<li>$2.00 for each additional child in Playtime</li>
</ul>
<BR><BR><a href="#top">Back to top</a><br><BR>
<a name="referral"></a>
<h2>Newcomer Referral Service</h2>
Newcomers maintains a list of doctors, plumbers, contractors, and other professionals who have been recommended by our members. Contact Kumiko Suzuki for more information.
<BR><BR><a href="#top">Back to top</a><br><BR>
<a name="neat"></a>
<h2>Newcomer Emergency Assistance Team (NEAT)</h2>
If you or any Newcomer you know needs assistance due to a medical or family crisis, we can provide meals, childcare and/or transportation. Contact Kumiko Suzuki for more information.
<BR><BR><a href="#top">Back to top</a><br><BR>
</td>
</td></tr></table>
</tr>
</table>
</body>
</html>
Last edited by TwoD; 12-10-06 at 10:19 AM.
Reason: Please use [code][/code] wrappers!
also: it's not that good to post the ENTIRE code. Only the part that matters is enough. You can strip down your problem to the javascript code and 1 usage example:
Code:
<script language="JavaScript">
btn1_on = new Image(); btn1_on.src = "images/nav_home.gif";
btn1_off = new Image(); btn1_off.src = "images/nav_home_onclick.gif";
btn2_on = new Image(); btn2_on.src = "images/nav_about_us.gif";
btn2_off = new Image(); btn2_off.src = "images/nav_about_us_onclick.gif";
btn3_on = new Image(); btn3_on.src = "images/nav_calendar.gif";
btn3_off = new Image(); btn3_off.src = "images/nav_calendar_onclick.gif";
btn4_on = new Image(); btn4_on.src = "images/nav_special_interest.gif";
btn4_off = new Image(); btn4_off.src = "images/nav_special_interest_onclick.gif";
btn5_on = new Image(); btn5_on.src = "images/nav_resources.gif";
btn5_off = new Image(); btn5_off.src = "images/nav_resources_onclick.gif";
btn6_on = new Image(); btn6_on.src = "images/nav_join_us.gif";
btn6_off = new Image(); btn6_off.src = "images/nav_join_us_onclick.gif";
function imageOn(name){
document.images[name].src = eval(name + '_off.src');
}
function imageOff(name){
document.images[name].src = eval(name + '_on.src');
}
</script>
<SCRIPT language=JavaScript>
var img_width = "468";
var img_height = "60";
var img_title = "Click Here";
var ad=new Array()
ad[0]='trendy_baby_ad.gif';
ad[1]='ad_2.gif';
ad[2]='ad_3.gif';
var links=new Array()
links[0]='http://www.thetrendybebe.com';
links[1]='http://www.citizensbank.com';
links[2]='http://www.ethos.com';
var xy=Math.floor(Math.random()*ad.length);
document.write('<a href="'+links[xy]+'" target="_blank"><img src="'+ad[xy]+'" width="'+img_width+'" height="'+img_height+'" alt="'+img_title+'"></a>');
</SCRIPT>
Thanks Undreal Ed, I am new to this board and EXTREMELY rusty with my scripting. I couldn't make heads or tails of your answer. I remember vaguely that something needs to be written in the HTML code to call the script in the right place, but where and how escapes me.
You know you can do this ALOT easier and dynamically without the bundle of script you are using. Unless this is a challenge you have taken or task you must complete I suggest you use the easy way. Would you like to know what it is?