BaileyBoy
11-04-2003, 10:18 PM
A site I'm working on needs a preview picture script - which it does in frame A. The larger image appears in frame B, however,
frame A refreshes, which I cannot have...I need help!
HERE'S AN ABBREVIATED VERSION OF THE SCRIPT (see <!--CONCERN--> below):
<head>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function previewPic(sel) {
document.previewpic.src = "" + sel.options[sel.selectedIndex].value;
}
function showPic(sel) {
images = new Array();
images[1] = "../main_pages/main1.html";
images[2] = "../main_pages/main2.html";
images[3] = "../main_pages/main3.html";
parent.MAIN.location.href = images[sel.selectedIndex+1];
}
// End -->
</script>
</head>
<body>
<form name=picform>
<img name="previewpic" src="preview_pics/acheff_sm.gif">
<select name=selbox size=1 onChange="previewPic(this)">
<option value="preview_pics/acheff_sm.gif">William Acheff
<option value="preview_pics/adams_sm.gif">Peter Adams
<option value="preview_pics/afsary_sm.gif">Cyrus Afsary
</select>
<!-- HERE'S THE CONCERN BELOW -->
<INPUT type="image" src="preview_pics/show_image.jpg" border="0" onclick="showPic(this.form.selbox)">
<!-- THE SIDE FRAME REFRESHES ITSELF WHENEVER THE 'SHOW IMAGE' IS CLICKED can that be stopped? -->
</form>
</body>
SEE IT IN ACTION AT http://www.baileycreative.com/masters2004
Many Thanks in advance!
frame A refreshes, which I cannot have...I need help!
HERE'S AN ABBREVIATED VERSION OF THE SCRIPT (see <!--CONCERN--> below):
<head>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function previewPic(sel) {
document.previewpic.src = "" + sel.options[sel.selectedIndex].value;
}
function showPic(sel) {
images = new Array();
images[1] = "../main_pages/main1.html";
images[2] = "../main_pages/main2.html";
images[3] = "../main_pages/main3.html";
parent.MAIN.location.href = images[sel.selectedIndex+1];
}
// End -->
</script>
</head>
<body>
<form name=picform>
<img name="previewpic" src="preview_pics/acheff_sm.gif">
<select name=selbox size=1 onChange="previewPic(this)">
<option value="preview_pics/acheff_sm.gif">William Acheff
<option value="preview_pics/adams_sm.gif">Peter Adams
<option value="preview_pics/afsary_sm.gif">Cyrus Afsary
</select>
<!-- HERE'S THE CONCERN BELOW -->
<INPUT type="image" src="preview_pics/show_image.jpg" border="0" onclick="showPic(this.form.selbox)">
<!-- THE SIDE FRAME REFRESHES ITSELF WHENEVER THE 'SHOW IMAGE' IS CLICKED can that be stopped? -->
</form>
</body>
SEE IT IN ACTION AT http://www.baileycreative.com/masters2004
Many Thanks in advance!