I’ve got a long piece of code im working with… however, I can’t paste the whole thing because it’s FARR too long… so you cant see the site in full functionality, but, can review the problem code in question…
PROBLEM #1:
I have four functions that change my titles when selections are made in my option fields. Three of the four work. changeSizeTitle(); changePrintTitle(); and changeColorTitle();… For some reason my function changeFrameTitle(); is returning “undefined” instead of the proper titles. I’ve compared the code for this function with the other three that are functioning properly, and I can’t see any difference. I’m stumped as to why this function is returning a value of “undefined”… Any ideas… advice appreciated.
Thanks to everyone in advance for taking the time to read this post and/or possibly helping me out with some ideas…
-John
———Javascript Portion———–
[CODE]
var frameFirst = new Array(
”,
”,
‘Economy Series’,
‘Classic Series’,
‘Oak Series’,
‘Architect Series’,
‘Homestyle Series’,
‘Corporate Series’,
‘Clean Cut Series’,
‘Rustic II Series’);
var frameSecond = new Array(
‘Economy Series’,
‘Classic Series’,
‘Oak Series’,
‘Architect Series’,
‘Homestyle Series’,
‘Corporate Series’,
‘Clean Cut Series’,
‘Rustic II Series’);
function changeFrameTitle(elemid){
if(document.drop_list.Frame.value == ‘NaN’)
{
var ind = document.getElementById(elemid).selectedIndex;
document.getElementById(“frameTitle”).innerHTML=frameFirst[ind];
document.getElementById(“profileTitle”).innerHTML=frameFirst[ind];
}
else
{
var ind = document.getElementById(elemid).selectedIndex;
document.getElementById(“frameTitle”).innerHTML=frameSecond[ind];
document.getElementById(“profileTitle”).innerHTML=frameFirst[ind];
}
}
———HTML Portion—————-
[CODE]
<div class=”size” name=”sizetitle” id=”sizeTitle”>
</div>
<div class=”print” name=”printtitle” id=”printTitle”>
</div>
<div class=”economy” name=”frametitle” id=”frameTitle”>
</div>
<div class=”honey” name=”colortitle” id=”colorTitle”>
</div>
<td>
<SELECT id=”Frame” NAME=”Frame” onChange=”changeFrame();changeFrameTitle(‘Frame’);ReadForm(this.form);” style=”width:260″>
<Option selected value=”NaN”>——————-</option>
<Option value=”NaN”>Please Select a Size First</option>
</SELECT>
</tr>
</td>