mediengestalter.info
FAQ :: Mitgliederliste :: MGi Team

Willkommen auf dem Portal für Mediengestalter

Aktuelles Datum und Uhrzeit: Sa 20.04.2024 01:27 Benutzername: Passwort: Auto-Login

Thema: iframe per javascript vertikal scrollen vom 11.01.2007

Neues Thema eröffnen   Neue Antwort erstellen MGi Foren-Übersicht -> Programmierung -> iframe per javascript vertikal scrollen
Autor Nachricht
bsights
Threadersteller

Dabei seit: 21.09.2005
Ort: Hamburg
Alter: -
Geschlecht: Männlich
Verfasst Do 11.01.2007 21:25
Titel

iframe per javascript vertikal scrollen

Antworten mit Zitat Zum Seitenanfang

Hallo,

ich bin auf der Suche nach einem Script, mit dem ich einen iframe (nicht veränderbare externe Quelle) vertikal scrollen kann.
Folgendes Script habe ich schon probiert: http://www.dyn-web.com/dhtml/iframes/scroll-v.html. Funktioniert natürlich prächtig. Problem: ich kopiere den gesamten Quelltext, setze eine andere Quelle anstelle des iframes scroll-v1.html ein, nämlich eine EXTERNE mit http://www...., und plötzlich geht nix mehr. Weder in IE, noch in Opera, Firefox etc..

Was muss ich ändern? Gibt es Alternativen?
Vielen dank für Anregungen & Tipps!
Alex

Hier die Daten:

Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en">
<head>
<title>Scrolling Iframe Content Vertically</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="robots" content="noindex,nofollow">
<style type="text/css">
body { font: 14px/1.3 verdana, arial, helvetica, sans-serif }
h1 { font-size:18px }   
a:link { color:#33c }   
a:visited { color:#339 }   

iframe { border: 1px dashed #666 }
div.arrows { width:300px; text-align:center }
div.arrows img { padding:8px }
</style>
<script type="text/javascript">
/*************************************************************************
  This code is from Dynamic Web Coding at http://www.dyn-web.com/
  See Terms of Use at http://www.dyn-web.com/bus/terms.html
  regarding conditions under which you may use this code.
  This notice must be retained in the code as is!
*************************************************************************/

var timer_id;
function scroll_iframe(frm,inc,dir) {
  if (timer_id) clearTimeout(timer_id);
  if (window.frames[frm]) {
    if (dir == "v") window.frames[frm].scrollBy(0, inc);
    else window.frames[frm].scrollBy(inc, 0);
    timer_id = setTimeout("scroll_iframe('" + frm + "'," + inc + ",'" + dir + "')", 20);
  }
}

function stopScroll() { if (timer_id) clearTimeout(timer_id); }
</script>
</head>
<body>

<iframe name="scr1" id="scr1" scrolling="no" src="scroll-v1.html" width="300" height="200" frameborder="0">Sorry, your browser doesn't support iframes.</iframe>

<div class="arrows">
  <a href="javascript:;" onmouseover="scroll_iframe('scr1', -4, 'v'); window.status='Hover here to scroll up.'; return true" onmouseout="stopScroll(); window.status=''; return true"><img src="../../images/nav/tri-up.gif" width="12" height="12" alt="" border="0"></a>
  <a href="javascript:;" onmouseover="scroll_iframe('scr1', 4, 'v'); window.status='Hover here to scroll down.'; return true" onmouseout="stopScroll(); window.status=''; return true"><img src="../../images/nav/tri-dn.gif" width="12" height="12" alt="" border="0"></a>
</div>

<p>Please read dyn-web's <a href="http://www.dyn-web.com/bus/terms.html">Terms of Use</a> if you plan to use our code.</p>

<p><a href="http://www.dyn-web.com/">www.dyn-web.com</a></p>

</body>
</html>
  View user's profile Private Nachricht senden Website dieses Benutzers besuchen
Ähnliche Themen [Javascript] iframe horizontal UND vertikal scrollen
iFrame: nur vertikal scrollen, geht das?
automatisch mit javascript horizontal und vertikal scrollen
[Javascript] Scrollen von iFrame [solved]
[JavaScript gesucht] IFrame soll scrollen!!
nur vertikal-scrollen / nicht horizontal. geht das?
Neues Thema eröffnen   Neue Antwort erstellen
MGi Foren-Übersicht -> Programmierung


Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst an Umfragen in diesem Forum nicht mitmachen.