All,
I'm trying to obtain the values from an external JavaScript using PHP -
In my index.php page I'm trying to obtain the value being passed in as such:
`<input type="hidden" name="imgSrcOrig" id="imgSrcOrig" value="<?php echo $_REQUEST['remote_sill']; ?>"/>``
However - in the JavaScript I need to pass into the hidden field above the name of the image located in myImg
Since this is trying to be obtained from an external JavaScript in PHP - what should the call so the image name value appears in the hidden field should be:
The JavaScript call is as such:
<script type="text/javascript" src="nextPrevious.js"></script>
A snippet of the JavaScript nextPrevious.js is a such:
// List image names without extension
var myImg = new Array(4)
myImg[0] = "image_sill_1";
myImg[1] = "sill_image_2";
myImg[2] = "image_sill_3";
myImg[3] = "shape_3_sill";
myImg[4] = "shape_4_sill";
// Tell browser where to find the image
myImgSrc = "sills/";
// Tell browser the type of file
myImgEnd = ".png"
var i = 0;
// Create function to load image
function loadImg() {
document.imgSrcOrig.src = myImgSrc + myImg[i] + myImgEnd;
}