Web Design Forums

Welcome! Please register or log in: Forgot your password? Why register?
You are here: Web Design Forums » Web Design Help » HTML and CSS Help » Javascript into dreamweaver RSS

Javascript into dreamweaver

This thread was started by espycream and has been viewed 193 times, but does not yet contain any replies. Be the first to reply!
Post Reply
1
View espycream's reputation
espycream, WDF Noob Private message  
Posted February 1 '10 at 10:45 PM
      Posts: 1
Hello I am wanting to put a rotater content into my "editable region" or do I need a editable region. This is what I am trying to do.

*Open Dreamweaver CS3 ** dunno if versions matter but im using CS3*

Step 1: Click the area I want to put the script
Step 2: Menu > Insert > HTML > Script Objects > Script
Step 3: A window pops up asking Type? which is Text/Javascript, What is the source?..I dont no...and of course the script itself which is the follow.

<script type="text/javascript">
var imgs1 = new Array("http://img269.imageshack.us/img269/9781/test1zw.jpg","http://img136.imageshack.us/img136/7831/test2g.jpg","http://img64.imageshack.us/img64/6810/test3m.jpg");
var lnks1 = new Array("http://img269.imageshack.us/img269/9781/test1zw.jpg","http://img136.imageshack.us/img136/7831/test2g.jpg","http://img64.imageshack.us/img64/6810/test3m.jpg");
var alt1 = new Array();
var currentAd1 = 0;
var imgCt1 = 3;
function cycle1() {
if (currentAd1 == imgCt1) {
currentAd1 = 0;
}
var banner1 = document.getElementById('adBanner1');
var link1 = document.getElementById('adLink1');
banner1.src=imgs1[currentAd1]
banner1.alt=alt1[currentAd1]
document.getElementById('adLink1').href=lnks1[currentAd1]
currentAd1++;
}
window.setInterval("cycle1()",4000);
</script>
<a href=""http://img269.imageshack.us/img269/9781/test1zw.jpg"" id="adLink1" target="_top">
<img src="http://img269.imageshack.us/img269/9781/test1zw.jpg" id="adBanner1" border="0" width="500" height="245"></a>

My website is www.sated-guild.com, the area I want to put it in is the upper left box below the Home button on the navi bar. Can anyone help me how to insert this rotator content I'd greatly Appreciate it THANX IN ADVANCED!!!!!


Additional info that may help is...I made my layout in photoshop, sliced n diced then imported into dreamweaver.

Advertisement Register for free to hide these ads and participate in discussions!

Post Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Do you think it is ok to use Javascript tabs? diddy Javascript, AJAX, and JSON 5 February 20 '09 03:36 PM
Dreamweaver and Images PaulT Web Design Discussion 3 January 19 '07 07:50 PM
JavaScript Dropdown Menu Tutorial [Li] Brad Coding Articles & Tutorials 12 August 17 '04 03:16 PM
Challenge this DW + Javascript Code !! Find me a solution !! arun99907 Javascript, AJAX, and JSON 0 December 26 '03 04:46 AM
embedded flash javascript error nickluto Adobe Flash Help 1 October 30 '03 12:24 AM