Hello,
I am looking to update a html textfield from javascript. The script produces a slideshow of images which can be viewed via next/previous buttons or a automatically via a time delay. I want a description to be placed above each corresponding image that will change whenever the image does. The text field i want to update is:
document.write("<input type=text name=desc size=50 value=\"Description goes here\"> ");
Here is the function i have in the same chunk of script that works out which image it is but this is obviously overwriting everything else:
function description() {
if(current==0) {
document.write('Image One');
}
else if(current==1) {
document.write('Image Two');
}
else if(current==2) {
document.write('Image Three');
}
}
Any ideas would be great - Thanks
I am looking to update a html textfield from javascript. The script produces a slideshow of images which can be viewed via next/previous buttons or a automatically via a time delay. I want a description to be placed above each corresponding image that will change whenever the image does. The text field i want to update is:
document.write("<input type=text name=desc size=50 value=\"Description goes here\"> ");
Here is the function i have in the same chunk of script that works out which image it is but this is obviously overwriting everything else:
function description() {
if(current==0) {
document.write('Image One');
}
else if(current==1) {
document.write('Image Two');
}
else if(current==2) {
document.write('Image Three');
}
}
Any ideas would be great - Thanks