|
|||
Script in iFrame ansprechen
Hallo!
Ich möchte dieses Script auf einer Seite einbauen: Dynamic Drive DHTML Scripts- DHTML Slide Show Script Der Inhalt (Bilder) soll dabei in einem iFrame eingebettet sein, die Buttons "weiter" und "zurück" dagegen im "parent-Frame". Hier mein Code für den Parent-Frame: Code:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>Test</title> </head> <body> <br /><br /> <iframe src="iframe.html" id="iframe" width="800" height="600"><br /><br /></iframe> <br /><br /> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="50%" height="21"><p align="left"><a href="javascript:parent.iframe.backward()" onClick="return false">Previous Slide</a></td> <td width="50%" height="21"><p align="right"><a href="javascript:parent.iframe.forward()" onClick="return false">Next Slide</a></td> </tr> </table> <p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br> <a href="http://dynamicdrive.com">Dynamic Drive</a></font></p> </iframe> </body> </html> Code:
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Unbenanntes Dokument</title> <script type="text/javascript"> /*********************************************** * DHTML slideshow script- © Dynamic Drive DHTML code library (www.dynamicdrive.com) * This notice must stay intact for legal use * Visit http://www.dynamicdrive.com/ for full source code ***********************************************/ var photos=new Array() var photoslink=new Array() var which=0 //define images. You can have as many as you want: photos[0]="bilder/01.jpg" photos[1]="bilder/02.jpg" photos[2]="bilder/03.jpg" //Specify whether images should be linked or not (1=linked) var linkornot=0 //Set corresponding URLs for above images. Define ONLY if variable linkornot equals "1" photoslink[0]="" photoslink[1]="" photoslink[2]="" //do NOT edit pass this line var preloadedimages=new Array() for (i=0;i<photos.length;i++){ preloadedimages[i]=new Image() preloadedimages[i].src=photos[i] } function applyeffect(){ if (document.all && photoslider.filters){ photoslider.filters.revealTrans.Transition=Math.floor(Math.random()*23) photoslider.filters.revealTrans.stop() photoslider.filters.revealTrans.apply() } } function playeffect(){ if (document.all && photoslider.filters) photoslider.filters.revealTrans.play() } function keeptrack(){ window.status="Image "+(which+1)+" of "+photos.length } function backward(){ if (which>0){ which-- applyeffect() document.images.photoslider.src=photos[which] playeffect() keeptrack() } } function forward(){ if (which<photos.length-1){ which++ applyeffect() document.images.photoslider.src=photos[which] playeffect() keeptrack() } } function transport(){ window.location=photoslink[which] } </script> </head> <body> <table border="0" cellspacing="0" cellpadding="0"> <tr> <td width="100%" colspan="2" height="22"><center> <script> if (linkornot==1) document.write('<a href="javascript:transport()">') document.write('<img src="'+photos[0]+'" name="photoslider" style="filter:revealTrans(duration=2,transition=23)" border=0>') if (linkornot==1) document.write('</a>') </script> </center></td> </tr> <tr> </tr> </table> <p align="center"><font face="Arial" size="-2">Free DHTML scripts provided by<br> <a href="http://dynamicdrive.com">Dynamic Drive</a></font></p> </body> </html> Mit Code:
javascript:parent.iframe.forward() Geändert von slein (05.08.2008 um 20:58 Uhr) |
Sponsored Links |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
Seite aus iFrame raushalten: klappt nicht in FF und Chrome | Kangooroo | (X)HTML | 6 | 29.04.2010 11:29 |
Markierter Text(Selection) aus einem iFrame ermitteln | [ASTERIX] | Javascript & Ajax | 2 | 29.09.2008 11:54 |
PHP Script mit GET-Parametern als Img-Src | Ares | Serveradministration und serverseitige Scripte | 2 | 13.09.2008 22:19 |
Divs in iframe anordnen | McFarlane | CSS | 0 | 27.08.2008 20:23 |
iframe Größe bei Laden des Inhalts an dessen Größe anpassen | wiseguy | Javascript & Ajax | 0 | 24.06.2007 23:04 |