J
Judy M
I am a Javascript Newbie, but have read two of the brick-sized books
and read the deja section and FAQ's and didn't find my answer. I'm
sure it is simple and apologize in advance, but here goes...
I want to pass a global variable. The code I have looks functionally
like this:
<head>
<Script...>
mypix= (this is an array of file names. This part works fine)
var thispic=0
var imgct =mypix.length -1
</script>
function.processnext() {
if document.images && thispic < imgct {
thispic++
document.mypicture.src=mypix[thispic]
}
</head>
<body>
a href="javascript.processnext()"> Next > ></a>
<script.language="javascript" type="text.javascript"
document.write(thispic) </script>
//right here I put the image. This part works fine. I get the next
image, then the next...
Whenever document.write is called, I get the original value of the
variable. I have even put the changed value in the Window.status bar,
and still document.write reads the original value.
How do I pass the changed value to the document.write method?
Thank you -- again, I apologize for what is surely a novice question.
Judy M
and read the deja section and FAQ's and didn't find my answer. I'm
sure it is simple and apologize in advance, but here goes...
I want to pass a global variable. The code I have looks functionally
like this:
<head>
<Script...>
mypix= (this is an array of file names. This part works fine)
var thispic=0
var imgct =mypix.length -1
</script>
function.processnext() {
if document.images && thispic < imgct {
thispic++
document.mypicture.src=mypix[thispic]
}
</head>
<body>
a href="javascript.processnext()"> Next > ></a>
<script.language="javascript" type="text.javascript"
document.write(thispic) </script>
//right here I put the image. This part works fine. I get the next
image, then the next...
Whenever document.write is called, I get the original value of the
variable. I have even put the changed value in the Window.status bar,
and still document.write reads the original value.
How do I pass the changed value to the document.write method?
Thank you -- again, I apologize for what is surely a novice question.
Judy M