Click here to Skip to main content
15,886,026 members
Home / Discussions / JavaScript
   

JavaScript

 
AnswerRe: Javascript and Dates Pin
Morgs Morgan15-Nov-11 1:40
Morgs Morgan15-Nov-11 1:40 
QuestionDisplay information in a table Pin
Member 82674566-Nov-11 22:49
Member 82674566-Nov-11 22:49 
AnswerRe: Display information in a table Pin
Dennis E White7-Nov-11 6:34
professionalDennis E White7-Nov-11 6:34 
AnswerRe: Display information in a table Pin
Hà Duy Thuận10-Jan-12 22:08
Hà Duy Thuận10-Jan-12 22:08 
Questionhow to open the minimized window after refreshing the page? Pin
dayakar_dn2-Nov-11 21:16
dayakar_dn2-Nov-11 21:16 
AnswerRe: how to open the minimized window after refreshing the page? Pin
Dennis E White7-Nov-11 6:14
professionalDennis E White7-Nov-11 6:14 
AnswerRe: how to open the minimized window after refreshing the page? Pin
jkirkerx19-Nov-11 20:17
professionaljkirkerx19-Nov-11 20:17 
QuestionAny body know the basic components to a javascript slideshow? Pin
swydell30-Oct-11 14:43
swydell30-Oct-11 14:43 
My assignment is to create a javascript slideshow using an array, and an onclick button to call the next image function.I've been visiting tutorial, using google, wikipedia but I'm still not quite clear on what I'm doing. I understand the for loop, arrays, functions, onclick button but I haven't been able to put it together to make the slideshow work. Any suggestions before I turn in my homework. Here is the code. It's not long. Thank you.


<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>slideshow</title>
<script type="text/javascript">

//create array of image objects

var myPic=new Array("photos/picture0.jpg",
"photos/picture1.jpg",
"photos/picture2.jpg",
"photos/picture3.jpg",
"photos/picture4.jpg")
var num=0; //I believe this is my index
//I don't understand why I'm creating a new array here.
//I saw it in two different tutorials
var preLoad=new Array(5)
//Here I'm initializing the counter and preloading the images.
for(i=0;i<mypic.length;i++)
{
preload[i]="new" image()="" don't="" understand="" this="" part="" yet="" or="" the="" next="" line.
="" i="" saw="" it="" in="" a="" tutorial
=""
="" preload[i].src="myPic[i]
}
//this" is="" to="" load="" image,="" reset="" counter="" and="" end="" loop.
function="" nextimg()
{
="" if(num<preload.length-1){
="" num="num+1;
" document.getelementbyid("myimg").src="preLoad[num].src
" }
="" else{="" }
}
&lt;="" script="">

</head>
<body>

<input type="button" value="show next picture" onclick="nextImg)" />
</body>
</html>
AnswerRe: Any body know the basic components to a javascript slideshow? Pin
Manfred Rudolf Bihy30-Oct-11 22:59
professionalManfred Rudolf Bihy30-Oct-11 22:59 
QuestionStop Text From Being Converted Into Links Pin
ASPnoob28-Oct-11 23:32
ASPnoob28-Oct-11 23:32 
AnswerRe: Stop Text From Being Converted Into Links Pin
Richard MacCutchan29-Oct-11 0:06
mveRichard MacCutchan29-Oct-11 0:06 
AnswerRe: Stop Text From Being Converted Into Links Pin
Dennis E White29-Oct-11 15:13
professionalDennis E White29-Oct-11 15:13 
QuestionIssue w/ Javascript inside 64 bit browser Pin
bgates197026-Oct-11 5:26
bgates197026-Oct-11 5:26 
AnswerRe: Issue w/ Javascript inside 64 bit browser Pin
Dennis E White27-Oct-11 9:08
professionalDennis E White27-Oct-11 9:08 
AnswerRe: Issue w/ Javascript inside 64 bit browser Pin
jsc4228-Oct-11 1:38
professionaljsc4228-Oct-11 1:38 
QuestionHTMLInput.name Pin
Ali Al Omairi(Abu AlHassan)25-Oct-11 21:40
professionalAli Al Omairi(Abu AlHassan)25-Oct-11 21:40 
AnswerRe: HTMLInput.name Pin
Gerben Jongerius25-Oct-11 22:10
Gerben Jongerius25-Oct-11 22:10 
GeneralRe: HTMLInput.name Pin
Ali Al Omairi(Abu AlHassan)25-Oct-11 23:41
professionalAli Al Omairi(Abu AlHassan)25-Oct-11 23:41 
QuestionJavascript validate the master and content page Pin
sathyan_829423-Oct-11 2:45
sathyan_829423-Oct-11 2:45 
AnswerRe: Javascript validate the master and content page Pin
DaveAuld23-Oct-11 3:41
professionalDaveAuld23-Oct-11 3:41 
AnswerRe: Javascript validate the master and content page Pin
MalarGayu9-Nov-11 15:33
MalarGayu9-Nov-11 15:33 
QuestionWhere is the data behind the page? Pin
LeonardoDaga22-Oct-11 0:37
LeonardoDaga22-Oct-11 0:37 
AnswerRe: Where is the data behind the page? Pin
Richard MacCutchan22-Oct-11 1:48
mveRichard MacCutchan22-Oct-11 1:48 
GeneralRe: Where is the data behind the page? Pin
LeonardoDaga22-Oct-11 6:12
LeonardoDaga22-Oct-11 6:12 
GeneralRe: Where is the data behind the page? Pin
Richard MacCutchan22-Oct-11 6:26
mveRichard MacCutchan22-Oct-11 6:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.