[javascrpt] meerdere pagina's aanroepen met 1 link

Pagina: 1
Acties:

  • Neelon
  • Registratie: Mei 2000
  • Laatst online: 20-02 12:22

Neelon

FOR PONY!!!

Topicstarter
Vraagje, hoe kan ik met 1 link 2 pagina's openen in verschillende frames? Ik gebruik in mijn menu deze link-opbouw:

<td width=200 class="Menu" align="center" onMouseOver="this.style.background='#800000'; msg('The world in Fallout 2'); return true;" onMouseOut="this.style.background='none';"><A HREF="fallout2/world.html" onMouseOver="msg('The world in Fallout 2'); return true;" TARGET="main">The Fallout 2 World</A><BR CLEAR=ALL></td>

Maar nu wil ik als ik een submenu aanroep via zo'n link, de pagina in het hoofdvenster laten veanderen in een lege pagina. Is dit mogelijk via javascript (ik vermoed het wel), en hoe kan ik dat implementeren?

De site-url is www.geocities.com/neelonrokk/fallout_page/index.html, en ik wil de informatie van de verschillende spellen laten verdwijnen als ik een menu van een ander spel aanroep. Bij voorbaat hartelijk bedankt.

"We here at the Torgue Corporation sincerely think that this is F*CKING AWESOME!!"


Verwijderd

Onderstaand Script zou je kunnen gebruiken, wanneer je telkens 2 pagina's wilt wisselen.
code:
1
2
3
4
5
6
7
8
<SCRIPT LANGUAGE="JavaScript"><!--
function functionName(fileName1,fileName2) {
    parent.menu.location.href = fileName1;
    parent.main.location.href = fileName2;
}
//--></SCRIPT>

<A HREF="#" onClick="functionName('file1.html','file2.html')">Go</A>

In jouw geval zou onderstaand voorbeeld ook voldoende moeten zijn:
code:
1
2
3
4
5
6
7
8
<SCRIPT LANGUAGE="JavaScript"><!--
function functionName(fileName1) {
    parent.menu.location.href = fileName1;
    parent.main.location = file2.html;
}
//--></SCRIPT>

<A HREF="#" onClick="functionName('file1.html')">Go</A>

  • Neelon
  • Registratie: Mei 2000
  • Laatst online: 20-02 12:22

Neelon

FOR PONY!!!

Topicstarter
Ik ga hem zo proberen, alvast bedankt...

"We here at the Torgue Corporation sincerely think that this is F*CKING AWESOME!!"


  • Neelon
  • Registratie: Mei 2000
  • Laatst online: 20-02 12:22

Neelon

FOR PONY!!!

Topicstarter
:) En het werkt perfect. Hartelijk bedankt.

"We here at the Torgue Corporation sincerely think that this is F*CKING AWESOME!!"