mediengestalter.info
FAQ :: Mitgliederliste :: MGi Team

Willkommen auf dem Portal für Mediengestalter

Aktuelles Datum und Uhrzeit: Do 28.03.2024 15:42 Benutzername: Passwort: Auto-Login

Thema: Banner Rotation wird im IE nicht angezeigt & Fehlermeldung vom 06.02.2011

Neues Thema eröffnen   Neue Antwort erstellen MGi Foren-Übersicht -> Programmierung -> Banner Rotation wird im IE nicht angezeigt & Fehlermeldung
Autor Nachricht
lenavieh
Threadersteller

Dabei seit: 12.06.2008
Ort: Bayern
Alter: 35
Geschlecht: Weiblich
Verfasst So 06.02.2011 14:13
Titel

Banner Rotation wird im IE nicht angezeigt & Fehlermeldu

Antworten mit Zitat Zum Seitenanfang

Hallo zusammen,

ich wollte was testen, um selbst etwas hinzubekommen, ohne ein CMS mit tollen Extensions zu verwenden, aber ich bin ein absoluter JavaScript noob und es funzt nicht we ich will. Ich finde irgendwie auch nirgends ne Lösung zu meinem Problem.

Folgendes habe ich vor: Banner Rotation -> 2 verlinkte Bilder abwechselnd einblenden.

Dazu habe ich ein Script gefunden, welches auch in FF perfekt läuft.


Die ausgelagerte .js Datei wird über folgenden Code im Head implementiert:
Code:
<script type="text/javascript" src="http://www.xy.de/bannerrotation/banners.min.js"></script>


Und dann im body an der Stelle aufgerufen, wo der Banner erscheinen soll:
Code:
<script type="text/javascript">
                show_banners('xybanner');
</script>





Ich schätze irgendwo hier liegt das Problem, nicht direkt in der .js-Datei, aber ich kopiere zur Vollständigkeit auch diesen Code:
Code:

**
/**
                Script settings
**/

var settings = {

        'force_size': 0,  //  if set to 1 all banners will be resized to the width and height in the next to settings
        'img_width': 468,  //  width to resize all banners to, only takes effect if above is 1
        'img_height': 60,  //   height to resize all banners to, only takes effect if above is 1

        'refresh_time': 3000, //   the seconds between refreshs of the banners - use 0 to disable
        'refresh_max':  100,     //   maximum number of refreshs on each page load

        'duplicate_banners':  0,    //    keep as 0 to make sure the same banner won't show on the same page. will only
                                                     take effect //  if show_banners(); is used more than once. You must make sure
                                                     you have enough banners to fill //  all the slots else the browser may freeze or
                                                     give a stack overflow error

        'location_prefix':       'adLocation-',  // The prefix of the IDs of the <div> which wraps the banners - this div is
                                                               generated dynamically.  //  a number will be added on the end of this
                                                               string. adLocation- was used by default before version 1.4.x

        'location_class':                'swb',    //  A class to add to all of the <div>s which wrap the banners, ideal to use for
                                                                   styling banners - use .swb img in your CSS

        'window':                                 '_self',     //    Window to open links in, _self = current, _blank = new. Use _top if
                                                                             in a frame!

        'default_ad_loc':                'default'        //        The default adLocation. This is assigned to any banners not given
                                                                               an adLocation in the below banner list
                                                                                 //  There is no real reason to need to change this
}


/**
                Banners
**/
// banner list syntax: new banner(website_name, website_url, banner_url, show_until_date, adlocation),  DATE FORMAT: dd/mm/yyyy
// if you're not using adlocations just leave it empty like '' as in the last example here
// to make sure a banner is always rotating, just set the date far into the future, i.e. year 3000

var banners = [
       
      new banner('Bild1',  'http://www.xy.de/index.php?option=com_content&view=article&id=22&Itemid=24',        '../templates/mydesign/images/banner_bild1.png',                '30/04/2099',        'xybanner'),

        new banner('Bild2', 'http://www.xy.de/index.php?option=com_content&view=article&id=12&Itemid=17',         '../templates/mydesign/images/banner_bild2.png', '30/04/2099', 'xybanner'),
]

//                                         There is no need to edit below here
///////////////////////////////////////////////////////////////////////////////////
var u





Wie gesag,t im FF läufts perfekt, aber der IE mag es nicht, zeigt garnix an und folgende Fehlermeldung kommt:

Meldung: 'banners[...]' ist Null oder kein Objekt
Zeile: 79
Zeichen: 733
Code: 0
URI: http://www.xy.de/bannerrotation/banners.min.js


Meldung: 'banners[...]' ist Null oder kein Objekt
Zeile: 79
Zeichen: 1697
Code: 0
URI: http://www.xy.de/bannerrotation/banners.min.js



Ich hab den Scriptschnipsel auch schon zum Test in DIVs gepackt, aber das bringt auch nix.

Kann mir jemand weiterhelfen? - Ich hab absolut keinen Plan und wenn ich nach diesem Fehler suche gibt es anscheinend 1000 Möglichkeiten, die diesen Fehler erzeugen.

P.S. JavaScript ist aktiviert. Der Banner ging im IE7 nich, dann hab ich auf den 8er aktualisiert, geht trotzdem nicht.


Vielen Dank im Voraus!!!


Zuletzt bearbeitet von lenavieh am So 06.02.2011 14:28, insgesamt 2-mal bearbeitet
  View user's profile Private Nachricht senden
Ähnliche Themen Flasheff - Banner für Rotation aufbereiten, solch ein Proble
banner wird nicht angezeigt
Banner wird einfach nicht angezeigt!
Banner wird teilweise nicht angezeigt?
Flash Banner: Ist der Kunde oder das Banner das Problem? :)
360° Rotation in Flash
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.