PDA

For continued disscussion on this topic : Refresh



kc
07-02-2000, 12:37 AM
I don't know what the term is but this menu won't (refresh,reload,reset) with netscape. When you click on a link then go to that page then go back the form stays at the same selection. Works fine with explorer.

Vinny you answered a previous question I had with this script at another board. So decided to move over here where you are a moderator.
Thanks Again

http://members.aol.com/bcpetsupply/test6.html


<HTML>

<HEAD>

<TITLE>Three Image Test</TITLE>

</HEAD>

<BODY>

<SCRIPT LANGUAGE=JavaScript>
<!--//

//This will set up the two dimensional arrays to store your information
cars=new Array()
cars[0]=new Array()
cars[1]=new Array()
cars[2]=new Array()

//This is where you populate your arrays with information
//The first parameter is what gets displayed in the drop down
//The second parameter is set to the value of the drop down

cars[0][0]=new Option("Toyota","http://www.toyota.com")
cars[0][1]=new Option("Nissan","http://www.NissanDriven.com")
cars[0][2]=new Option("Honda","http://www.honda.com")

cars[1][0]=new Option("Cadillac","http://www.cadillac.com")
cars[1][1]=new Option("Chevorlet","http://www.chevrolet.com")
cars[1][2]=new Option("Oldsmobile","http://www.oldsmobile.com")

cars[2][0]=new Option("TheName","TheLink")
cars[2][1]=new Option("The Next Name abc 123 def 456-----","TheNextLink")

function fillList(z){
//This will loop through and erase the existing drop down
for (a=document.f.s.options.length-1;a>0;a--){document.f.s.options[a]=null}

//This will loop through and fill the drop down with the new information
for (a=0;a<cars[z].length;a++){document.f.s.options[a]=new Option(cars[z][a].text,cars[z][a].value)
}
//This just puts the list back to the first option
document.f.s.selectedIndex=0
}

//-->
</SCRIPT>



<FORM NAME=f>
<!--// The number within the call to the fillList function determines which array will be used to fill in the list //-->
<A HREF=Javascript:fillList(0)><IMG SRC=buy.gif alt=Buy width=75 height=50 border=0></A>
<A HREF=Javascript:fillList(1)><IMG SRC=rent.gif alt=Rent width=75 height=50 border=0></A>
<A HREF=Javascript:fillList(2)><IMG SRC=image.gif alt=Alttag width=75 height=50 border=0></A>
<BR>
<SELECT NAME="s" size="1">
<OPTION VALUE="thispage.htm">----------Do you want to rent or buy?----------
<OPTION>
<OPTION>
<OPTION>
<OPTION>
<OPTION>
<OPTION>
</SELECT>
<!--// Clicking this button will take you to the url that corresponds to the choice you made from the drop down //-->
<INPUT TYPE=button onclick="location=document.f.s.options[document.f.s.selectedIndex].value" VALUE=">>">
</FORM>

</BODY>
</HTML>

Vincent Puglia
07-02-2000, 02:53 AM
Hi kc,

I hate to tell you this -- but if the link is supposed to show me a working script with options in the selection box -- it doesn't -- at least not for aol, nor netscape.
At any rate you could try:

<body....onLoad='document.formname.reset()'>

if that doesn't work, you'll have to put a no-cache in your meta tags. don't remember it offhand, but it's here somewhere on this board or the old ones. I'll look for it and post it if I can find it. If not, either I or someone else will put it up. (The people here are pretty good about that.)

Vinny

kc
07-02-2000, 04:14 AM
Boy I don't know why that link doesn't link for you? Works from my end with aol & netscape. The links in the buy and rent should be ok. That said, added this <META HTTP-EQUIV="Pragma" CONTENT="no-cache"> and so far it seems to work. http://members.aol.com/bcpetsupply/test6.html

KC

Vincent Puglia
07-02-2000, 01:47 PM
Hi kc,

glad the tag worked out. Re the links: must have been tired. I saw the empty images, but didn't bother clicking on them. Assumed they were separate from the selection list.

Vinny