In my photo album, using php to write a hidden field into the page.
$counter = "imagestr#" and the number is 1 through 9Code:<input type='hidden' value='$hiddenstr' name='$counter'>
$hiddenstr = "a,b,c,d,e" (for example)
I am using the following code to 1) change the image of image to that of the source and 2) write the text from that hidden field into a div tag.
I am using the following lineCode:<script> function showPicture(filename,imageid){ document.images["PictureBox"].src = filename; document.getElementById("imagecontents").innerHTML = document.imageid.value } </script>
the first value is the pathway to the image and the second is the name of the hidden field.Code:Javascript:showPicture('photo_album/$subcatagory/$folder/$entry',$counter)
Can anyone help me get the text to display? I got the image to work but I can get the text from the hidden field to appear in a div tag. Thank you for the help.


Reply With Quote