Novice needs help

B

Bob Leffew

I have inherited a program using javascript and am trying to learn the
language.

I have a problem I cant figure out.

On my page I have a form with a List/Menu inside of a form.

the value of the list box is a name that corresponds with a jpg in a defined
directory and also corresponds with a html page in a defined directory.

When you click on the List/Menu in real time the corresponding image changes
accordingly and when the image is clicked on the correct page opens.

But when I tried adding a new value to the Lis/Menu in development, in real
time the image changes but html page does not. (Value of html remains
contant)

I definitely added a jpg into the proper directory with the proper value
name and also created a html page with the proper name.

All I can figure out is when I add in new values some type of index must be
being kept but I cant figure out where.

Any suggestions?

Below is code from program:

<script language="JavaScript1.2" cyberversion="N1.2"><!--

function PreLoad() {
var doc=document;
if(doc.images){
if(!doc.newarray) doc.newarray=new Array();
var x,y=doc.newarray.length,a=PreLoad.arguments;
for(x=0; x<a.length; x++)
if (a[x].indexOf("#")!=0){
doc.newarray[y]=new Image; doc.newarray[y++].src=a[x];
}
}
}

function PreLoadAll() {
PreLoad('images/npabout.gif', 'images/npctcat.gif', 'images/npcontact.gif',
'images/npfloorplan.gif', 'images/npform.gif', 'images/nphelp.gif',
'images/npshoppinglist.gif', 'images/nptdcat.gif',
'images/thumbnails/CustomCabinets.jpg');
}

function changeReadout(newReadout)

{

// change image for nav readout

window.document.np.src = newReadout;

}

function changeProduct(selectedProduct)

{
if (selectedProduct == ""){
} else {
// changeout product image

var newSrc = "images/thumbnails/" + selectedProduct + ".jpg";
window.document.preview.src = newSrc;

// changeout product link address

var newPreviewLink = "catalog/" + selectedProduct + ".html";
window.document.links[16].href = newPreviewLink;
}
}

function OpenList()
{
window.open('catalog/preview.html','ListWindow','width=400,height=500,direct
ories=no,location=no,menubar=no,scrollbars=yes,status=yes,toolbar=no,resizab
le=no,status=no,titlebar=no');
}
-->
</script>

Thanks,

Bob Leffew
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,015
Latest member
AmbrosePal

Latest Threads

Top