I am currently utilizing an array in my code:
function displayStoneCut(box){
var stonecutPics = new Array(5)
stonecutPics[0] = "images/designform7/design-form-07_type6-2.gif";
stonecutPics[1] = "images/designform7/design-form-07_type6-1.gif";
stonecutPics[2] = "images/designform7/design-form-07_type6-3.gif";
stonecutPics[3] = "images/designform7/design-form-07_type6-4.gif";
stonecutPics[4] = "images/designform7/design-form-07_type6-5.gif";
document.getElementById('stonecutpic').src = stonecutPics[parseInt(box.value)];
}
This array is designed to function alongside radio buttons.
<input name="stonecut" type="radio" onClick="displayStoneCut(this);" value="0" >
<input name="stonecut" type="radio" onClick="displayStoneCut(this);" value="1" checked >
By interacting with these radio buttons, images lower down the page will be swapped:
<img src="images/designform7/design-form-07_type5-1.gif" width="139" height="161" name="stonepic" id="stonepic"/><img src="images/designform7/design-form-07_type6-1.gif" width="168" height="161" name="stonecutpic" id="stonecutpic"/>
The aforementioned functionality is integrated within a multipage form controlled through CSS. However, I am encountering an issue when sending the form (using ASP and JMail). The values are coming through as numbers (0, 1, 2) instead of strings or word values.
I seek advice on the best solution for this problem. Should I modify the array, introduce another value to the radio button, or incorporate an additional array?
Any assistance provided would be greatly valued.