---
title: "Uppdatera två frames-inte så lätt i detta fall"
type: "forum-thread"
url: "https://www.webforum.nu/amne/javascript/18825-uppdatera-två-frames-inte-så-lätt-i-detta-fall"
topic: "JavaScript"
topic_url: "https://www.webforum.nu/amne/javascript"
author: "soffan76"
published: "2002-01-29T21:07:00.000Z"
updated: "2002-01-30T14:39:00.000Z"
replies: 2
views: 191
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/javascript/18825-uppdatera-två-frames-inte-så-lätt-i-detta-fall"
---

# Uppdatera två frames-inte så lätt i detta fall

## #1 — soffan76, 2002-01-29T21:07Z

Hej alla!

Jag har ett problem. Jag har hittat ett skript med en s.k. folddown-meny. Jag vill nu kunna uppdatera två frames när man klickar på en av undermenyerna. Jag kan inte få till det. Kan nån hjälpa vore jag mycket tacksam.

```

// *****************************************************************************
// **                                SETTINGS                                 **
// *****************************************************************************

// 'linka' use this if part of the URL is the same in ALL the links
// In this example all the files are in a subfolder called 'pages'
linka='pages/';

// the filename of the page the menu appears in eg 'menu.html'
thisPage='menu.html';

// Do you want to use images for the category bullets?
// If so then specify the path to your images folder from the menu page
imgPath='images/';

// do you want to use images for the category bullets?
lev1img='yes';					// insert yes or no

// give image names and dimensions
lev1OpName='open.gif';			// open image name
lev1OpHeight='10';				// image height
lev1OpWidth='10';				// image width

lev1ClosName='closed.gif';		// closed image name
lev1ClosHeight='10';			// image height
lev1ClosWidth='10';				// image width

// do you want to use images for the sub-category bullets?
lev2img='yes';		// insert yes or no

// give image names and dimensions
lev2Name='bullet.gif';			// image name
lev2Height='10';				// image height
lev2Width='16';					// image width

// do you want to use a text character for the sub-category bullets?
lev2Char='no';		// insert yes or no

// set bullet character for level 2 bullets
bullet = '&#155; ';

// base target - the frame that the links are targetting
base = 'main';

// *****************************************************************************
// **                             END OF SETTINGS                             **
// *****************************************************************************

// pulls 'page' variable out of URL - do not alter
	var x = 0
	page = location.search.substr(1).split("?")
	for (x=0;x<=page.length;x++) {
		eval(page)
		}
page = escape(page);
page = page.slice(7);

// do not alter this bit
function subMenu(name,linkb) {
 this.name = name;
 this.linkb = linkb;
}
document.write('<BASE target="' + base + '">');

 function load2(URL1,URL2)
{
	parent.main.location.href=URL1;
	parent.top.location.href=URL2;
}

// *****************************************************************************
// **                             BUILD MENU DATA                             **
// *****************************************************************************

// Civils & Drainage Menu
if (page=='civ') {
thisMenu = new Array();
thisMenu[0] = new subMenu('test1','koncernen.htm');
thisMenu[1] = new subMenu('test2','below.html');
thisMenu[2] = new subMenu('test3','paving.html');
}

// Clothing Menu
if (page=='cloth') {
thisMenu = new Array();
thisMenu[0] = new subMenu('Hats',"javascript:load2('test1.htm', 'test2.htm')");
thisMenu[1] = new subMenu('Gloves','gloves.html');
thisMenu[2] = new subMenu('Coats','coats.html');
}
```

Permalänk: https://www.webforum.nu/p/18825

## #2 — Jojoxx, 2002-01-30T06:39Z

```
<select name="foo" onChange="var ua=this[this.selectedIndex].value.split(':'); parent.framea.location.href=ua[0]; parent.frameb.location.href=ua[1];">
<option value="sida1.html:sida2.html">Sida 1 och 2</option>
<option value="sida3.html:sida4.html">Sida 3 och 4</option>
</select>
```

Permalänk: https://www.webforum.nu/p/336311

## #3 — soffan76, 2002-01-30T14:39Z

OK, tack!
Ska testa!

Permalänk: https://www.webforum.nu/p/336312

---

Tråden på webben: https://www.webforum.nu/amne/javascript/18825-uppdatera-två-frames-inte-så-lätt-i-detta-fall
