Toon posts:

met 1 link 2 frames veranderen

Pagina: 1
Acties:
  • 35 views sinds 30-01-2008

Verwijderd

Topicstarter
Hoe kan ik met 1 link in twee verschillende frames se source veranderen?

Dus in 1 frame de ene pagina laden en in een ander frame een verschillende pagina laden?

  • Alex)
  • Registratie: Juni 2003
  • Laatst online: 12-12-2025
JavaScript:
1
2
document.framenaamlinks.location.href='links'
document.framenaamrechts.location.href='rechts'

We are shaping the future


Verwijderd

Topicstarter
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="stylesheets/stylesheet_topframe.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
    function main(){
        parent.leftframe.location.href="leftframe.html";
        parent.mainframe.location.href="main.html";
    }
    function tc(){
        parent.leftframe.location.href="navigatie_menu/tc_menu.html";
        parent.mainframe.location.href="subpages/structuur_tc.html";
    }
    function jc(){
        parent.leftframe.location.href="navigatie_menu/jc_menu.html";
        parent.mainframe.location.href="subpages/structuur_jc.html";
    }
    function ac(){
        parent.leftframe.location.href="navigatie_menu/ac_menu.html";
        parent.mainframe.location.href="subpages/structuur_ac.html";
    }
    function pac(){
        parent.leftframe.location.href="navigatie_menu/pac_menu.html";
        parent.mainframe.location.href="subpages/structuur_pac.html";
    }
    function pc(){
        parent.leftframe.location.href="navigatie_menu/pc_menu.html";
        parent.mainframe.location.href="subpages/structuur_pc.html";
    }
</script>
</head>

<body bottommargin="0" topmargin="0" leftmargin="0" rightmargin="0">
<table width="800">
    <tr>
        <td>[img]"images/topframe.jpg"></td>
    </tr>
    <tr>
        <td[/img]
        <table width="100%" style="font-family=Verdana; font-size=11;font-weight=bold;color=#FFFFFF">
            <tr>
                <td><a href="" onClick="javascript:main();" onMouseOver="this.className='over';" onMouseOut="this.className='norm';">Home</a></td>
                <td><a href="" onClick="javascript:tc();" onMouseOver="this.className='over';" onMouseOut="this.className='norm';" >Technische Commissie</a></td>
                <td><a href="" onClick="javascript:jc();" onMouseOver="this.className='over';" onMouseOut="this.className='norm';" >Jeugdcommissie</a></td>
                <td><a href="" onClick="javascript:ac();" onMouseOver="this.className='over';" onMouseOut="this.className='norm';" >Activiteitencommissie</a></td>
                <td><a href="" onClick="javascript:pac();" onMouseOver="this.className='over';" onMouseOut="this.className='norm';" >Paviljoencommissie</a></td>
                <td><a href="" onClick="javascript:pc();" onMouseOver="this.className='over';" onMouseOut="this.className='norm';" >Publiciteitscommissie</a></td>
            </tr>
        </table>
        </td>
    </tr>
</table>
</body>
</html>


Dit is wat ik heb, werkt goed echter....

als ik 1 keer heb geklikt staan de waarden 'vast' zeg maar, dan kan ik niet de waarden nogmaals veranderen....

Dus ik kan niet als ik op een andere link klik, de frames naar andere waarden veranderen.

[ Voor 23% gewijzigd door Verwijderd op 25-01-2005 20:28 ]


  • Alex)
  • Registratie: Juni 2003
  • Laatst online: 12-12-2025
Waar op internet heb je die page gedumpt?
(Een [ code ] sluit je af met [ / ] of met [ /code ], zonder spaties)

We are shaping the future


Verwijderd

Topicstarter
Alex schreef op dinsdag 25 januari 2005 @ 20:27:
Waar op internet heb je die page gedumpt?
(Een [ code ] sluit je af met [ / ] of met [ /code ], zonder spaties)
Ik zag het idd toen ik hem gepost had....sorry.

De pagina staat op http://www.nienhof.nl

  • Alex)
  • Registratie: Juni 2003
  • Laatst online: 12-12-2025
Dat komt denk ik door je href="" maak daar eens href="#" van?

We are shaping the future


Verwijderd

Topicstarter
TOP!!! Werkt...

  • crisp
  • Registratie: Februari 2000
  • Laatst online: 00:28

crisp

Devver

Pixelated

liever zo:
HTML:
1
<a href="main.html" target="mainframe" onclick="main();return false">Main</a>

dan werkt het ook eventueel zonder JS, enkel je leftframe gaat dan niet mee. Verder is het dan ook te volgen voor zoekmachines.
Verder:
- javascript: in een eventhandler is onzinnig en eigenlijk gewoon fout
- je classname swap is ook onzinnig (en classname swaps zijn ook nog eens traag); dat kan gewoon met een :hover pseudoclass in CSS
- het language attribuut voor het script-element is deprecated. Een type-attribuut is echter wel verplicht (type="text/javascript")
- nog meer over deprecated attributen die CSS-equivalents hebben en over het gebruik van tabellen waar ze niet voor bedoelt zijn ;)

Intentionally left blank


  • Alex)
  • Registratie: Juni 2003
  • Laatst online: 12-12-2025
Even stukje eigen ervaring:
Wat je zegt over className is waar, ik gebruik het zelf liever niet, maar ja, ik moet wel door de uiteindelijke toepassing (swap van meerdere classes e.d.)
Dat language="" deprecated is, wist ik niet...
Ik leer wel om met veel meer absoluut gepositioneerde div's te gaan werken.

We are shaping the future


  • Pelle
  • Registratie: Januari 2001
  • Laatst online: 15-05 19:36

Pelle

🚴‍♂️

Dit is dus al 1000 keer voorbij gekomen, had je ook met de search kunnen vinden :)
Pagina: 1

Dit topic is gesloten.