Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Novice needs help

Reply
Thread Tools

Novice needs help

 
 
Bob Leffew
Guest
Posts: n/a
 
      08-13-2003
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,d irect
ories=no,location=no,menubar=no,scrollbars=yes,sta tus=yes,toolbar=no,resizab
le=no,status=no,titlebar=no');
}
-->
</script>

Thanks,

Bob Leffew


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Novice needs help with Client VPN Shane Cisco 0 02-22-2006 04:11 PM
Novice needs help! Connection Problem MAG7577 Wireless Networking 1 01-07-2005 12:11 AM
Novice needs help! Connection Problem MAG7577 Wireless Networking 2 01-07-2005 12:10 AM
Home Network problems - bad card? IP issues? novice needs help john Computer Support 2 08-18-2004 03:06 AM
A novice college student needs the help of the true "guru"s! Rodney Edmondson Java 3 11-25-2003 04:46 PM



Advertisments