Ga naar inhoud

2 pagina's tegelijkertijd laten openen.


Yannick
 Delen

Aanbevolen berichten

hallo dan :)

ik heb een redelijk simpele vraag (denk ik dan toch).

ik ben een site aan het maken, gewoon simpel met frames.

ik laat een link openen in het linker frame, simpel..

maar nu wil er tegelijkertijd ook nog eentje in het main frame laten openen.

deze 2 acties dus door op 1 en de zelfde knop te drukken.

hoe kan ik dat doen??

things you might need to know

-de site is volledig in html

-ik beschik over dreamweaver mx

alvast bedankt voor jullie hulp.

Mv.Gr

Yannick

Link naar reactie
Delen op andere sites


is dit niks ?

<!--

this example assumes the page from two frames, frameIndex and frameContent

-->

<html>

<head>

<title>Your Title</title>

<!--

display in the frameContent by default

-->

<base target="frameContent">

</head>

<body>

<!--

build the index table however you like

-->

<table>

<tr>

<!-- update indexFrame and contentFrame -->

<td><a language="JavaScript" href="./page_to_display_in_frameIndex.htm" target="_self" onClick="parent.frameContent.location.href='./page_to_display_in_frameContent.htm'">Index Item 2</a></td>

<!-- update contentFrame only -->

<td><a href="./page_to_display_in_frameContent_only.htm" >Index Item 2</a></td>

</tr>

</table>

</body>

</html>

Link naar reactie
Delen op andere sites


To open two frames with one link, you need to use dynamic HTML.

The first step, however, is to set up your frames so that the DHTML will work. You have to name your frames:

<frameset rows="100,*">

<frame src="top.html" name="top">

<frame src="bottom.html" name="bottom">

</frameset>

Set Up the Link

So far, we've created two frames, the top frame called "top" and the bottom called "bottom". In the top.html page, we'll put the link that will change both frames.

Normally, when you add a link to a frame, the link will open either in the same frame that it's in, or in the frame that is named in thetargetattribute.

In your top.html page, put a link in to change the top.html to top2.html:

<a href="top2.html">This will change both frames</a>

Then you need to add the script to change the bottom frame. You do this with JavaScript and onClick.

You use the Javascript to tell the browser to change the named frame's location:

onClick='parent.bottom.location.href="bottom2.html"'.

Remember, the bottom frame is called "bottom". If you wanted to change a frame called "navigation" you would writeparent.navigation.location.href

The final link to change two frames at once looks like:

<a href="top2.html" onClick='parent.bottom.location.href="bottom2.html"'>This will change both frames</a>

Link naar reactie
Delen op andere sites


 Delen

×
×
  • Nieuwe aanmaken...