PDA

View Full Version : Resolved Need help with creating differnt array type



ajfmrf
04-05-2014, 11:58 PM
http://www.dynamicdrive.com/dynamicindex14/image4.htm

I am trying to change the lings(and it's array) to quotes.

here is what I am working with as of this post:


<!DOCTYPE html>
<html>
<head>
<style type="text/css">
body{font-size:20px;color:red;}
</style>
<script language="JavaScript1.1">
<!--

//*****************************************
// Blending Image Slide Show Script-
// Dynamic Drive (www.dynamicdrive.com)
// For full source code, visit http://www.dynamicdrive.com/
//*****************************************

//specify interval between slide (in mili seconds)
var slidespeed=3000

//specify images
var slideimages=new Array("1b.jpg","2b.jpg","3b.jpg")

//specify corresponding quotes
var slidequotes=new Array(
" I hope this works but have my doubts",
"you are fabulous,my dear fabulous",
"You really think you are better then me?")

var newwindow=1 //open links in new window? 1=yes, 0=no

var imageholder=new Array()
var ie=document.all
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}



//-->
</script>
<style type="text/css">
* { margin:0;padding:0; }
html, body { height:100%; width:100%; text-align:center; }
#workspace { position:relative; margin-left:auto; margin-right:auto; text-align:left; width:1000px; border:1px solid red; }
</style>

</head>
<body>

<div id="workspace">
<img src="1b.jpg" name="slide" border=0 style="filter:blendTrans(duration=3)" width=640 height=427>

<script language="JavaScript1.1">
<!--

var whichquotes=0
var whichimage=0
var blenddelay=(ie)? document.images.slide.filters[0].duration*1000 : 0
function slideit(){
if (!document.images) return
if (ie) document.images.slide.filters[0].apply()
document.images.slide.src=imageholder[whichimage].src
if (ie) document.images.slide.filters[0].play()
whichquotes=whichimage
whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
setTimeout("slideit()",slidespeed+blenddelay)
}
slideit()

//-->
</script>

<p align="center"><font face="arial">This free script provided by<br>
<a href="http://www.dynamicdrive.com">Dynamic Drive</a></font></p>

</div>

</body>
</html>


I don't know which way to go from here.I see the

<a href="javascript:gotoshow()">

And figure I can remove that part but I don't have any idea how to go about getting the text to show.

Can I do this (and get some pointers) if I keep the credit in the script?

Or will this be against policy?

Thanks

jscheuer1
04-06-2014, 05:42 AM
You can change the script any way you want as long as you keep the credit notice.

What are "lings"? Oh, you must mean links. Then what you're asking makes sense.


<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">

//*****************************************
// Blending Image Slide Show Script-
// Dynamic Drive (www.dynamicdrive.com)
// For full source code, visit http://www.dynamicdrive.com/
//*****************************************

//specify interval between slide (in mili seconds)
var slidespeed=3000

//specify images
var slideimages=["1b.jpg", "2b.jpg", "3b.jpg"];

//specify corresponding quotes
var slidequotes=[
"I hope this works but have my doubts",
"you are fabulous,my dear fabulous",
"You really think you are better then me?"];

var imageholder=new Array()
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}

</script>
</head>
<body>
<img src="image1.gif" name="slide" border=0 style="filter:blendTrans(duration=3)" width=97 height=100>
<div id="quotes">"I hope this works but have my doubts"</div>

<script type="text/javascript">

var whichquote=0
var whichimage=0
var blenddelay=(document.images.slide.filters)? document.images.slide.filters[0].duration*1000 : 0
function slideit(){
if (!document.images) return
if (document.images.slide.filters) document.images.slide.filters[0].apply()
document.images.slide.src=imageholder[whichimage].src
if (document.images.slide.filters) document.images.slide.filters[0].play()
whichquote=whichimage
document.getElementById('quotes').innerHTML = slidequotes[whichquote];
whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0
setTimeout("slideit()",slidespeed+blenddelay)
}
slideit()

</script>

<p align="center"><font face="arial" size="-2">This free script provided by<br>
<a href="http://www.dynamicdrive.com">Dynamic Drive</a></font></p>
</body>
</html>

ajfmrf
04-07-2014, 12:01 AM
Thanks John,I felt like I was close to getting what I want and now I need to finish it up-thanks again