PSD-Tutorials.de
Forum für Design, Fotografie & Bildbearbeitung
Tutkit
Agentur
Hilfe
Kontakt
Start
Forum
Aktuelles
Besonderer Inhalt
Foren durchsuchen
Tutorials
News
Anmelden
Kostenlos registrieren
Aktuelles
Suche
Suche
Nur Titel durchsuchen
Von:
Menü
Anmelden
Kostenlos registrieren
App installieren
Installieren
JavaScript ist deaktiviert. Für eine bessere Darstellung aktiviere bitte JavaScript in deinem Browser, bevor du fortfährst.
Du verwendest einen veralteten Browser. Es ist möglich, dass diese oder andere Websites nicht korrekt angezeigt werden.
Du solltest ein Upgrade durchführen oder einen
alternativen Browser
verwenden.
Antworten auf deine Fragen:
Neues Thema erstellen
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
JS ohne Link aktivieren
Beitrag
<blockquote data-quote="qazwsx" data-source="post: 1120875" data-attributes="member: 306066"><p><strong>AW: JS ohne Link aktivieren</strong></p><p></p><p>Hallo!</p><p></p><p>Erstmal DANKE dir!</p><p></p><p>Nur, wie soll ich die Funktion, die beim Anklicken des Links aktiviert wird, herausfinden?</p><p></p><p>Denn habe schon versch. Sachen probiert, aber meistens war dann das Video einfach auf der Seite zu sehen, es erschien nicht die Box. Habe auch nicht allzu viel Erfahrung mit JS.</p><p></p><p>Das mit den onLoad einfuegen habe ich verstanden, Google sei Dank! Jetzt fehlt mir nur noch die Funktion.</p><p></p><p>Hier die Datei:</p><p>[CODE]</p><p>/**************************************************************</p><p></p><p> Script : MultiBox</p><p> Version : 1.3.1</p><p> Authors : Samuel Birch</p><p> Desc : Supports jpg, gif, png, flash, flv, mov, wmv, mp3, html, iframe</p><p> Licence : Open Source MIT Licence</p><p></p><p>**************************************************************/</p><p></p><p>var MultiBox = new Class({</p><p> </p><p> getOptions: function(){</p><p> return {</p><p> initialWidth: 250,</p><p> initialHeight: 250,</p><p> container: document.body,</p><p> useOverlay: false,</p><p> contentColor: '#FFF',</p><p> showNumbers: true,</p><p> showControls: true,</p><p> //showThumbnails: false,</p><p> //autoPlay: false,</p><p> waitDuration: 2000,</p><p> descClassName: false,</p><p> descMinWidth: 400,</p><p> descMaxWidth: 600,</p><p> movieWidth: 400,</p><p> movieHeight: 300,</p><p> offset: {x:0, y:0},</p><p> fixedTop: false,</p><p> path: 'files/',</p><p> onOpen: Class.empty,</p><p> onClose: Class.empty,</p><p> openFromLink: true,</p><p> relativeToWindow: true</p><p> };</p><p> },</p><p></p><p> initialize: function(className, options){</p><p> this.setOptions(this.getOptions(), options);</p><p> </p><p> this.openClosePos = {};</p><p> this.timer = 0;</p><p> this.contentToLoad = {};</p><p> this.index = 0;</p><p> this.opened = false;</p><p> this.contentObj = {};</p><p> this.containerDefaults = {};</p><p> </p><p> if(this.options.useOverlay){</p><p> this.overlay = new Overlay({container: this.options.container, onClick:this.close.bind(this)});</p><p> }</p><p> </p><p> this.content = $$('.'+className);</p><p> if(this.options.descClassName){</p><p> this.descriptions = $$('.'+this.options.descClassName);</p><p> this.descriptions.each(function(el){</p><p> el.setStyle('display', 'none');</p><p> });</p><p> }</p><p> </p><p> this.container = new Element('div').addClass('MultiBoxContainer').injectInside(this.options.container);</p><p> this.iframe = new Element('iframe').setProperties({</p><p> 'id': 'multiBoxIframe',</p><p> 'name': 'mulitBoxIframe',</p><p> 'src': 'javascript:void(0);',</p><p> 'frameborder': 1,</p><p> 'scrolling': 'no'</p><p> }).setStyles({</p><p> 'position': 'absolute',</p><p> 'top': -20,</p><p> 'left': -20,</p><p> 'width': '115%',</p><p> 'height': '115%',</p><p> 'filter': 'progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)',</p><p> 'opacity': 0</p><p> }).injectInside(this.container);</p><p> this.box = new Element('div').addClass('MultiBoxContent').injectInside(this.container);</p><p> </p><p> this.closeButton = new Element('div').addClass('MultiBoxClose').injectInside(this.container).addEvent('click', this.close.bind(this));</p><p> </p><p> this.controlsContainer = new Element('div').addClass('MultiBoxControlsContainer').injectInside(this.container);</p><p> this.controls = new Element('div').addClass('MultiBoxControls').injectInside(this.controlsContainer);</p><p> </p><p> this.previousButton = new Element('div').addClass('MultiBoxPrevious').injectInside(this.controls).addEvent('click', this.previous.bind(this));</p><p> this.nextButton = new Element('div').addClass('MultiBoxNext').injectInside(this.controls).addEvent('click', this.next.bind(this));</p><p> </p><p> this.title = new Element('div').addClass('MultiBoxTitle').injectInside(this.controls);</p><p> this.number = new Element('div').addClass('MultiBoxNumber').injectInside(this.controls);</p><p> this.description = new Element('div').addClass('MultiBoxDescription').injectInside(this.controls);</p><p> </p><p> </p><p> </p><p> if(this.content.length == 1){</p><p> this.title.setStyles({</p><p> 'margin-left': 0</p><p> });</p><p> this.description.setStyles({</p><p> 'margin-left': 0</p><p> });</p><p> this.previousButton.setStyle('display', 'none');</p><p> this.nextButton.setStyle('display', 'none');</p><p> this.number.setStyle('display', 'none');</p><p> }</p><p> </p><p> new Element('div').setStyle('clear', 'both').injectInside(this.controls);</p><p> </p><p> this.content.each(function(el,i){</p><p> el.index = i;</p><p> el.addEvent('click', function(e){</p><p> new Event(e).stop();</p><p> this.open(el);</p><p> }.bind(this));</p><p> if(el.href.indexOf('#') > -1){</p><p> el.content = $(el.href.substr(el.href.indexOf('#')+1));</p><p> if(el.content){el.content.setStyle('display','none');}</p><p> }</p><p> }, this);</p><p> </p><p> this.containerEffects = new Fx.Styles(this.container, {duration: 400, transition: Fx.Transitions.sineInOut});</p><p> this.controlEffects = new Fx.Styles(this.controlsContainer, {duration: 300, transition: Fx.Transitions.sineInOut});</p><p> </p><p> this.reset();</p><p> },</p><p> </p><p> setContentType: function(link){</p><p> var str = link.href.substr(link.href.lastIndexOf('.')+1).toLowerCase();</p><p> var contentOptions = {};</p><p> if($chk(link.rel)){</p><p> var optArr = link.rel.split(',');</p><p> optArr.each(function(el){</p><p> var ta = el.split(':');</p><p> contentOptions[ta[0]] = ta[1];</p><p> });</p><p> }</p><p> </p><p> if(contentOptions.type != undefined){</p><p> str = contentOptions.type;</p><p> }</p><p> </p><p> this.contentObj = {};</p><p> this.contentObj.url = link.href;</p><p> this.contentObj.xH = 0;</p><p> </p><p> if(contentOptions.width){</p><p> this.contentObj.width = contentOptions.width;</p><p> }else{</p><p> this.contentObj.width = this.options.movieWidth;</p><p> }</p><p> if(contentOptions.height){</p><p> this.contentObj.height = contentOptions.height; </p><p> }else{</p><p> this.contentObj.height = this.options.movieHeight;</p><p> }</p><p> if(contentOptions.panel){</p><p> this.panelPosition = contentOptions.panel;</p><p> }else{</p><p> this.panelPosition = this.options.panel;</p><p> }</p><p> </p><p> </p><p> switch(str){</p><p> case 'jpg':</p><p> case 'gif':</p><p> case 'png':</p><p> this.type = 'image';</p><p> break;</p><p> case 'swf':</p><p> this.type = 'flash';</p><p> break;</p><p> case 'flv':</p><p> this.type = 'flashVideo';</p><p> this.contentObj.xH = 70;</p><p> break;</p><p> case 'mov':</p><p> this.type = 'quicktime';</p><p> break;</p><p> case 'wmv':</p><p> this.type = 'windowsMedia';</p><p> break;</p><p> case 'rv':</p><p> case 'rm':</p><p> case 'rmvb':</p><p> this.type = 'real';</p><p> break;</p><p> case 'mp3':</p><p> this.type = 'flashMp3';</p><p> this.contentObj.width = 320;</p><p> this.contentObj.height = 70;</p><p> break;</p><p> case 'element':</p><p> this.type = 'htmlelement';</p><p> this.elementContent = link.content;</p><p> this.elementContent.setStyles({</p><p> display: 'block',</p><p> opacity: 0</p><p> })</p><p> </p><p> if(this.elementContent.getStyle('width') != 'auto'){</p><p> this.contentObj.width = this.elementContent.getStyle('width');</p><p> }</p><p> </p><p> this.contentObj.height = this.elementContent.getSize().size.y;</p><p> this.elementContent.setStyles({</p><p> display: 'none',</p><p> opacity: 1</p><p> })</p><p> break;</p><p> </p><p> default:</p><p> </p><p> this.type = 'iframe';</p><p> if(contentOptions.ajax){</p><p> this.type = 'ajax';</p><p> }</p><p> break;</p><p> }</p><p> },</p><p> </p><p> reset: function(){</p><p> this.container.setStyles({</p><p> 'opacity': 0,</p><p> 'display': 'none'</p><p> });</p><p> this.controlsContainer.setStyles({</p><p> 'height': 0</p><p> });</p><p> this.removeContent();</p><p> this.previousButton.removeClass('MultiBoxButtonDisabled');</p><p> this.nextButton.removeClass('MultiBoxButtonDisabled');</p><p> this.opened = false;</p><p> },</p><p> </p><p> getOpenClosePos: function(el){</p><p> if (this.options.openFromLink) {</p><p> if (el.getFirst()) {</p><p> var w = el.getFirst().getCoordinates().width - (this.container.getStyle('border').toInt() * 2);</p><p> if (w < 0) {</p><p> w = 0</p><p> }</p><p> var h = el.getFirst().getCoordinates().height - (this.container.getStyle('border').toInt() * 2);</p><p> if (h < 0) {</p><p> h = 0</p><p> }</p><p> this.openClosePos = {</p><p> width: w,</p><p> height: h,</p><p> top: el.getFirst().getCoordinates().top,</p><p> left: el.getFirst().getCoordinates().left</p><p> };</p><p> }</p><p> else {</p><p> var w = el.getCoordinates().width - (this.container.getStyle('border').toInt() * 2);</p><p> if (w < 0) {</p><p> w = 0</p><p> }</p><p> var h = el.getCoordinates().height - (this.container.getStyle('border').toInt() * 2);</p><p> if (h < 0) {</p><p> h = 0</p><p> }</p><p> this.openClosePos = {</p><p> width: w,</p><p> height: h,</p><p> top: el.getCoordinates().top,</p><p> left: el.getCoordinates().left</p><p> };</p><p> }</p><p> }else{</p><p> if(this.options.fixedTop){</p><p> var top = this.options.fixedTop;</p><p> }else{</p><p> var top = ((window.getHeight()/2)-(this.options.initialHeight/2)-this.container.getStyle('border').toInt())+this.options.offset.y;</p><p> }</p><p> this.openClosePos = {</p><p> width: this.options.initialWidth,</p><p> height: this.options.initialHeight,</p><p> top: top,</p><p> left: ((window.getWidth()/2)-(this.options.initialWidth/2)-this.container.getStyle('border').toInt())+this.options.offset.x</p><p> };</p><p> }</p><p> return this.openClosePos;</p><p> },</p><p> </p><p> open: function(el){</p><p> </p><p> this.options.onOpen();</p><p> </p><p> this.index = this.content.indexOf(el);</p><p> </p><p> this.openId = el.getProperty('id');</p><p> </p><p> if(!this.opened){</p><p> this.opened = true;</p><p> </p><p> if(this.options.useOverlay){</p><p> this.overlay.show();</p><p> }</p><p> </p><p> this.container.setStyles(this.getOpenClosePos(el));</p><p> this.container.setStyles({</p><p> opacity: 0,</p><p> display: 'block'</p><p> });</p><p> </p><p> if(this.options.fixedTop){</p><p> var top = this.options.fixedTop;</p><p> }else{</p><p> var top = ((window.getHeight()/2)-(this.options.initialHeight/2)-this.container.getStyle('border').toInt())+this.options.offset.y;</p><p> }</p><p> </p><p> this.containerEffects.start({</p><p> width: this.options.initialWidth,</p><p> height: this.options.initialHeight,</p><p> top: top,</p><p> left: ((window.getWidth()/2)-(this.options.initialWidth/2)-this.container.getStyle('border').toInt())+this.options.offset.x,</p><p> opacity: [0, 1]</p><p> });</p><p> </p><p> this.load(this.index);</p><p> </p><p> }else{</p><p> if (this.options.showControls) {</p><p> this.hideControls();</p><p> }</p><p> this.getOpenClosePos(this.content[this.index]);</p><p> this.timer = this.hideContent.bind(this).delay(500);</p><p> this.timer = this.load.pass(this.index, this).delay(1100);</p><p> </p><p> }</p><p> </p><p> },</p><p> </p><p> getContent: function(index){</p><p> this.setContentType(this.content[index]);</p><p> var desc = {};</p><p> if(this.options.descClassName){</p><p> this.descriptions.each(function(el,i){</p><p> if(el.hasClass(this.openId)){</p><p> desc = el.*****();</p><p> }</p><p> },this);</p><p> }</p><p> //var title = this.content[index].title;</p><p> this.contentToLoad = {</p><p> title: this.content[index].title || '&nbsp;',</p><p> //desc: $(this.options.descClassName+this.content[index].id).*****(),</p><p> desc: desc,</p><p> number: index+1</p><p> };</p><p> },</p><p> </p><p> close: function(){</p><p> if(this.options.useOverlay){</p><p> this.overlay.hide();</p><p> }</p><p> if (this.options.showControls) {</p><p> this.hideControls();</p><p> }</p><p> this.hideContent();</p><p> this.containerEffects.stop();</p><p> this.zoomOut.bind(this).delay(500);</p><p> this.options.onClose();</p><p> },</p><p> </p><p> zoomOut: function(){</p><p> this.containerEffects.start({</p><p> width: this.openClosePos.width,</p><p> height: this.openClosePos.height,</p><p> top: this.openClosePos.top,</p><p> left: this.openClosePos.left,</p><p> opacity: 0</p><p> });</p><p> this.reset.bind(this).delay(500);</p><p> },</p><p> </p><p> load: function(index){</p><p> this.box.addClass('MultiBoxLoading');</p><p> this.getContent(index);</p><p> if(this.type == 'image'){</p><p> var xH = this.contentObj.xH;</p><p> this.contentObj = new Asset.image(this.content[index].href, {onload: this.resize.bind(this)});</p><p> this.contentObj.xH = xH;</p><p> /*this.contentObj = new Image();</p><p> this.contentObj.onload = this.resize.bind(this);</p><p> this.contentObj.src = this.content[index].href;*/</p><p> }else{</p><p> this.resize();</p><p> }</p><p> },</p><p> </p><p> resize: function(){</p><p> if (this.options.fixedTop) {</p><p> var top = this.options.fixedTop;</p><p> }</p><p> else {</p><p> var top = ((window.getHeight() / 2) - ((Number(this.contentObj.height) + this.contentObj.xH) / 2) - this.container.getStyle('border').toInt() + window.getScrollTop()) + this.options.offset.y;</p><p> }</p><p> var left = ((window.getWidth() / 2) - (this.contentObj.width / 2) - this.container.getStyle('border').toInt()) + this.options.offset.x;</p><p> if (top < 0) {</p><p> top = 0</p><p> }</p><p> if (left < 0) {</p><p> left = 0</p><p> }</p><p> </p><p> this.containerEffects.stop();</p><p> this.containerEffects.start({</p><p> width: this.contentObj.width,</p><p> height: Number(this.contentObj.height) + this.contentObj.xH,</p><p> top: top,</p><p> left: left,</p><p> opacity: 1</p><p> });</p><p> this.timer = this.showContent.bind(this).delay(500);</p><p> },</p><p> </p><p> showContent: function(){</p><p> this.box.removeClass('MultiBoxLoading');</p><p> this.removeContent();</p><p> </p><p> this.contentContainer = new Element('div').setProperties({id: 'MultiBoxContentContainer'}).setStyles({opacity: 0, width: this.contentObj.width+'px', height: (Number(this.contentObj.height)+this.contentObj.xH)+'px'}).injectInside(this.box);</p><p> </p><p> if(this.type == 'image'){</p><p> this.contentObj.injectInside(this.contentContainer);</p><p> </p><p> }else if(this.type == 'iframe'){</p><p> new Element('iframe').setProperties({</p><p> id: 'iFrame'+new Date().getTime(), </p><p> width: this.contentObj.width,</p><p> height: this.contentObj.height,</p><p> src: this.contentObj.url,</p><p> frameborder: 0,</p><p> scrolling: 'auto'</p><p> }).injectInside(this.contentContainer);</p><p> </p><p> }else if(this.type == 'htmlelement'){</p><p> this.elementContent.*****().setStyle('display','block').injectInside(this.contentContainer);</p><p> </p><p> }else if(this.type == 'ajax'){</p><p> new Ajax(this.contentObj.url, {</p><p> method: 'get',</p><p> update: 'MultiBoxContentContainer',</p><p> evalScripts: true,</p><p> autoCancel: true</p><p> }).request();</p><p> </p><p> }else{</p><p> var obj = this.createEmbedObject().injectInside(this.contentContainer);</p><p> if(this.str != ''){</p><p> $('MultiBoxMediaObject').innerHTML = this.str;</p><p> }</p><p> }</p><p> </p><p> this.contentEffects = new Fx.Styles(this.contentContainer, {duration: 500, transition: Fx.Transitions.linear});</p><p> this.contentEffects.start({</p><p> opacity: 1</p><p> });</p><p> </p><p> this.title.setHTML(this.contentToLoad.title);</p><p> this.number.setHTML(this.contentToLoad.number+' of '+this.content.length);</p><p> if (this.options.descClassName) {</p><p> if (this.description.getFirst()) {</p><p> this.description.getFirst().remove();</p><p> }</p><p> this.contentToLoad.desc.injectInside(this.description).setStyles({</p><p> display: 'block'</p><p> });</p><p> }</p><p> //this.removeContent.bind(this).delay(500);</p><p> if (this.options.showControls) {</p><p> this.timer = this.showControls.bind(this).delay(800);</p><p> }</p><p> },</p><p> </p><p> hideContent: function(){</p><p> this.box.addClass('MultiBoxLoading');</p><p> this.contentEffects.start({</p><p> opacity: 0</p><p> });</p><p> this.removeContent.bind(this).delay(500);</p><p> },</p><p> </p><p> removeContent: function(){</p><p> if($('MultiBoxMediaObject')){</p><p> $('MultiBoxMediaObject').empty();</p><p> $('MultiBoxMediaObject').remove();</p><p> }</p><p> if($('MultiBoxContentContainer')){</p><p> //$('MultiBoxContentContainer').empty();</p><p> $('MultiBoxContentContainer').remove(); </p><p> }</p><p> },</p><p> </p><p> showControls: function(){</p><p> this.clicked = false;</p><p> </p><p> if(this.container.getStyle('height') != 'auto'){</p><p> this.containerDefaults.height = this.container.getStyle('height')</p><p> this.containerDefaults.backgroundColor = this.options.contentColor;</p><p> }</p><p> </p><p> this.container.setStyles({</p><p> //'backgroundColor': this.controls.getStyle('backgroundColor'),</p><p> 'height': 'auto'</p><p> });</p><p> </p><p> if(this.contentToLoad.number == 1){</p><p> this.previousButton.addClass('MultiBoxPreviousDisabled');</p><p> }else{</p><p> this.previousButton.removeClass('MultiBoxPreviousDisabled');</p><p> }</p><p> if(this.contentToLoad.number == this.content.length){</p><p> this.nextButton.addClass('MultiBoxNextDisabled');</p><p> }else{</p><p> this.nextButton.removeClass('MultiBoxNextDisabled');</p><p> }</p><p> </p><p> this.controlEffects.start({'height': this.controls.getStyle('height')});</p><p></p><p> },</p><p> </p><p> hideControls: function(num){</p><p> this.controlEffects.start({'height': 0}).chain(function(){</p><p> this.container.setStyles(this.containerDefaults);</p><p> }.bind(this));</p><p> },</p><p> </p><p> showThumbnails: function(){</p><p> </p><p> },</p><p> </p><p> next: function(){</p><p> if(this.index < this.content.length-1){</p><p> this.index++;</p><p> this.openId = this.content[this.index].getProperty('id');</p><p> if (this.options.showControls) {</p><p> this.hideControls();</p><p> }</p><p> this.getOpenClosePos(this.content[this.index]);</p><p> //this.getContent(this.index);</p><p> this.timer = this.hideContent.bind(this).delay(500);</p><p> this.timer = this.load.pass(this.index, this).delay(1100);</p><p> }</p><p> },</p><p> </p><p> previous: function(){</p><p> if(this.index > 0){</p><p> this.index--;</p><p> this.openId = this.content[this.index].getProperty('id');</p><p> if (this.options.showControls) {</p><p> this.hideControls();</p><p> }</p><p> this.getOpenClosePos(this.content[this.index]);</p><p> //this.getContent(this.index);</p><p> this.timer = this.hideContent.bind(this).delay(500);</p><p> this.timer = this.load.pass(this.index, this).delay(1000);</p><p> }</p><p> },</p><p> </p><p> createEmbedObject: function(){</p><p> if(this.type == 'flash'){</p><p> var url = this.contentObj.url;</p><p> </p><p> var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'});</p><p> this.str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" '</p><p> this.str += 'width="'+this.contentObj.width+'" ';</p><p> this.str += 'height="'+this.contentObj.height+'" ';</p><p> this.str += 'title="MultiBoxMedia">';</p><p> this.str += '<param name="movie" value="'+url+'" />'</p><p> this.str += '<param name="quality" value="high" />';</p><p> this.str += '<embed src="'+url+'" ';</p><p> this.str += 'quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" ';</p><p> this.str += 'width="'+this.contentObj.width+'" ';</p><p> this.str += 'height="'+this.contentObj.height+'"></embed>';</p><p> this.str += '</object>';</p><p> </p><p> }</p><p> </p><p> if(this.type == 'flashVideo'){</p><p> //var url = this.contentObj.url.substring(0, this.contentObj.url.lastIndexOf('.'));</p><p> var url = this.contentObj.url;</p><p> </p><p> var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'});</p><p> this.str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" '</p><p> this.str += 'width="'+this.contentObj.width+'" ';</p><p> this.str += 'height="'+(Number(this.contentObj.height)+this.contentObj.xH)+'" ';</p><p> this.str += 'title="MultiBoxMedia">';</p><p> this.str += '<param name="movie" value="'+this.options.path+'flvplayer.swf" />'</p><p> this.str += '<param name="quality" value="high" />';</p><p> this.str += '<param name="salign" value="TL" />';</p><p> this.str += '<param name="scale" value="noScale" />';</p><p> this.str += '<param name="FlashVars" value="path='+url+'" />';</p><p> this.str += '<embed src="'+this.options.path+'flvplayer.swf" ';</p><p> this.str += 'quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" ';</p><p> this.str += 'width="'+this.contentObj.width+'" ';</p><p> this.str += 'height="'+(Number(this.contentObj.height)+this.contentObj.xH)+'"';</p><p> this.str += 'salign="TL" ';</p><p> this.str += 'scale="noScale" ';</p><p> this.str += 'FlashVars="path='+url+'"';</p><p> this.str += '></embed>';</p><p> this.str += '</object>';</p><p> </p><p> }</p><p> </p><p> if(this.type == 'flashMp3'){</p><p> var url = this.contentObj.url;</p><p> </p><p> var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'});</p><p> this.str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" '</p><p> this.str += 'width="'+this.contentObj.width+'" ';</p><p> this.str += 'height="'+this.contentObj.height+'" ';</p><p> this.str += 'title="MultiBoxMedia">';</p><p> this.str += '<param name="movie" value="'+this.options.path+'mp3player.swf" />'</p><p> this.str += '<param name="quality" value="high" />';</p><p> this.str += '<param name="salign" value="TL" />';</p><p> this.str += '<param name="scale" value="noScale" />';</p><p> this.str += '<param name="FlashVars" value="path='+url+'" />';</p><p> this.str += '<embed src="'+this.options.path+'mp3player.swf" ';</p><p> this.str += 'quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" ';</p><p> this.str += 'width="'+this.contentObj.width+'" ';</p><p> this.str += 'height="'+this.contentObj.height+'"';</p><p> this.str += 'salign="TL" ';</p><p> this.str += 'scale="noScale" ';</p><p> this.str += 'FlashVars="path='+url+'"';</p><p> this.str += '></embed>';</p><p> this.str += '</object>';</p><p> }</p><p> </p><p> if(this.type == 'quicktime'){</p><p> var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'});</p><p> this.str = '<object type="video/quicktime" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab"';</p><p> this.str += ' width="'+this.contentObj.width+'" height="'+this.contentObj.height+'">';</p><p> this.str += '<param name="src" value="'+this.contentObj.url+'" />';</p><p> this.str += '<param name="autoplay" value="true" />';</p><p> this.str += '<param name="controller" value="true" />';</p><p> this.str += '<param name="enablejavascript" value="true" />';</p><p> this.str += '<embed src="'+this.contentObj.url+'" autoplay="true" pluginspage="http://www.apple.com/quicktime/download/" width="'+this.contentObj.width+'" height="'+this.contentObj.height+'"></embed>';</p><p> this.str += '<object/>';</p><p> </p><p> }</p><p> </p><p> if(this.type == 'windowsMedia'){</p><p> var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'});</p><p> this.str = '<object type="application/x-oleobject" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"';</p><p> this.str += ' width="'+this.contentObj.width+'" height="'+this.contentObj.height+'">';</p><p> this.str += '<param name="filename" value="'+this.contentObj.url+'" />';</p><p> this.str += '<param name="Showcontrols" value="true" />';</p><p> this.str += '<param name="autoStart" value="true" />';</p><p> this.str += '<embed type="application/x-mplayer2" src="'+this.contentObj.url+'" Showcontrols="true" autoStart="true" width="'+this.contentObj.width+'" height="'+this.contentObj.height+'"></embed>';</p><p> this.str += '<object/>';</p><p> </p><p> }</p><p> </p><p> if(this.type == 'real'){</p><p> var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'});</p><p> this.str = '<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"';</p><p> this.str += ' width="'+this.contentObj.width+'" height="'+this.contentObj.height+'">';</p><p> this.str += '<param name="src" value="'+this.contentObj.url+'" />';</p><p> this.str += '<param name="controls" value="ImageWindow" />';</p><p> this.str += '<param name="autostart" value="true" />';</p><p> this.str += '<embed src="'+this.contentObj.url+'" controls="ImageWindow" autostart="true" width="'+this.contentObj.width+'" height="'+this.contentObj.height+'"></embed>';</p><p> this.str += '<object/>';</p><p> </p><p> }</p><p> </p><p> return obj;</p><p> }</p><p> </p><p>});</p><p>MultiBox.implement(new Options);</p><p>MultiBox.implement(new Events);</p><p></p><p></p><p>/*************************************************************/</p><p></p><p>[/CODE]</p><p></p><p>Danke an euch fuer jede Hilfe!</p></blockquote><p></p>
[QUOTE="qazwsx, post: 1120875, member: 306066"] [b]AW: JS ohne Link aktivieren[/b] Hallo! Erstmal DANKE dir! Nur, wie soll ich die Funktion, die beim Anklicken des Links aktiviert wird, herausfinden? Denn habe schon versch. Sachen probiert, aber meistens war dann das Video einfach auf der Seite zu sehen, es erschien nicht die Box. Habe auch nicht allzu viel Erfahrung mit JS. Das mit den onLoad einfuegen habe ich verstanden, Google sei Dank! Jetzt fehlt mir nur noch die Funktion. Hier die Datei: [CODE] /************************************************************** Script : MultiBox Version : 1.3.1 Authors : Samuel Birch Desc : Supports jpg, gif, png, flash, flv, mov, wmv, mp3, html, iframe Licence : Open Source MIT Licence **************************************************************/ var MultiBox = new Class({ getOptions: function(){ return { initialWidth: 250, initialHeight: 250, container: document.body, useOverlay: false, contentColor: '#FFF', showNumbers: true, showControls: true, //showThumbnails: false, //autoPlay: false, waitDuration: 2000, descClassName: false, descMinWidth: 400, descMaxWidth: 600, movieWidth: 400, movieHeight: 300, offset: {x:0, y:0}, fixedTop: false, path: 'files/', onOpen: Class.empty, onClose: Class.empty, openFromLink: true, relativeToWindow: true }; }, initialize: function(className, options){ this.setOptions(this.getOptions(), options); this.openClosePos = {}; this.timer = 0; this.contentToLoad = {}; this.index = 0; this.opened = false; this.contentObj = {}; this.containerDefaults = {}; if(this.options.useOverlay){ this.overlay = new Overlay({container: this.options.container, onClick:this.close.bind(this)}); } this.content = $$('.'+className); if(this.options.descClassName){ this.descriptions = $$('.'+this.options.descClassName); this.descriptions.each(function(el){ el.setStyle('display', 'none'); }); } this.container = new Element('div').addClass('MultiBoxContainer').injectInside(this.options.container); this.iframe = new Element('iframe').setProperties({ 'id': 'multiBoxIframe', 'name': 'mulitBoxIframe', 'src': 'javascript:void(0);', 'frameborder': 1, 'scrolling': 'no' }).setStyles({ 'position': 'absolute', 'top': -20, 'left': -20, 'width': '115%', 'height': '115%', 'filter': 'progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)', 'opacity': 0 }).injectInside(this.container); this.box = new Element('div').addClass('MultiBoxContent').injectInside(this.container); this.closeButton = new Element('div').addClass('MultiBoxClose').injectInside(this.container).addEvent('click', this.close.bind(this)); this.controlsContainer = new Element('div').addClass('MultiBoxControlsContainer').injectInside(this.container); this.controls = new Element('div').addClass('MultiBoxControls').injectInside(this.controlsContainer); this.previousButton = new Element('div').addClass('MultiBoxPrevious').injectInside(this.controls).addEvent('click', this.previous.bind(this)); this.nextButton = new Element('div').addClass('MultiBoxNext').injectInside(this.controls).addEvent('click', this.next.bind(this)); this.title = new Element('div').addClass('MultiBoxTitle').injectInside(this.controls); this.number = new Element('div').addClass('MultiBoxNumber').injectInside(this.controls); this.description = new Element('div').addClass('MultiBoxDescription').injectInside(this.controls); if(this.content.length == 1){ this.title.setStyles({ 'margin-left': 0 }); this.description.setStyles({ 'margin-left': 0 }); this.previousButton.setStyle('display', 'none'); this.nextButton.setStyle('display', 'none'); this.number.setStyle('display', 'none'); } new Element('div').setStyle('clear', 'both').injectInside(this.controls); this.content.each(function(el,i){ el.index = i; el.addEvent('click', function(e){ new Event(e).stop(); this.open(el); }.bind(this)); if(el.href.indexOf('#') > -1){ el.content = $(el.href.substr(el.href.indexOf('#')+1)); if(el.content){el.content.setStyle('display','none');} } }, this); this.containerEffects = new Fx.Styles(this.container, {duration: 400, transition: Fx.Transitions.sineInOut}); this.controlEffects = new Fx.Styles(this.controlsContainer, {duration: 300, transition: Fx.Transitions.sineInOut}); this.reset(); }, setContentType: function(link){ var str = link.href.substr(link.href.lastIndexOf('.')+1).toLowerCase(); var contentOptions = {}; if($chk(link.rel)){ var optArr = link.rel.split(','); optArr.each(function(el){ var ta = el.split(':'); contentOptions[ta[0]] = ta[1]; }); } if(contentOptions.type != undefined){ str = contentOptions.type; } this.contentObj = {}; this.contentObj.url = link.href; this.contentObj.xH = 0; if(contentOptions.width){ this.contentObj.width = contentOptions.width; }else{ this.contentObj.width = this.options.movieWidth; } if(contentOptions.height){ this.contentObj.height = contentOptions.height; }else{ this.contentObj.height = this.options.movieHeight; } if(contentOptions.panel){ this.panelPosition = contentOptions.panel; }else{ this.panelPosition = this.options.panel; } switch(str){ case 'jpg': case 'gif': case 'png': this.type = 'image'; break; case 'swf': this.type = 'flash'; break; case 'flv': this.type = 'flashVideo'; this.contentObj.xH = 70; break; case 'mov': this.type = 'quicktime'; break; case 'wmv': this.type = 'windowsMedia'; break; case 'rv': case 'rm': case 'rmvb': this.type = 'real'; break; case 'mp3': this.type = 'flashMp3'; this.contentObj.width = 320; this.contentObj.height = 70; break; case 'element': this.type = 'htmlelement'; this.elementContent = link.content; this.elementContent.setStyles({ display: 'block', opacity: 0 }) if(this.elementContent.getStyle('width') != 'auto'){ this.contentObj.width = this.elementContent.getStyle('width'); } this.contentObj.height = this.elementContent.getSize().size.y; this.elementContent.setStyles({ display: 'none', opacity: 1 }) break; default: this.type = 'iframe'; if(contentOptions.ajax){ this.type = 'ajax'; } break; } }, reset: function(){ this.container.setStyles({ 'opacity': 0, 'display': 'none' }); this.controlsContainer.setStyles({ 'height': 0 }); this.removeContent(); this.previousButton.removeClass('MultiBoxButtonDisabled'); this.nextButton.removeClass('MultiBoxButtonDisabled'); this.opened = false; }, getOpenClosePos: function(el){ if (this.options.openFromLink) { if (el.getFirst()) { var w = el.getFirst().getCoordinates().width - (this.container.getStyle('border').toInt() * 2); if (w < 0) { w = 0 } var h = el.getFirst().getCoordinates().height - (this.container.getStyle('border').toInt() * 2); if (h < 0) { h = 0 } this.openClosePos = { width: w, height: h, top: el.getFirst().getCoordinates().top, left: el.getFirst().getCoordinates().left }; } else { var w = el.getCoordinates().width - (this.container.getStyle('border').toInt() * 2); if (w < 0) { w = 0 } var h = el.getCoordinates().height - (this.container.getStyle('border').toInt() * 2); if (h < 0) { h = 0 } this.openClosePos = { width: w, height: h, top: el.getCoordinates().top, left: el.getCoordinates().left }; } }else{ if(this.options.fixedTop){ var top = this.options.fixedTop; }else{ var top = ((window.getHeight()/2)-(this.options.initialHeight/2)-this.container.getStyle('border').toInt())+this.options.offset.y; } this.openClosePos = { width: this.options.initialWidth, height: this.options.initialHeight, top: top, left: ((window.getWidth()/2)-(this.options.initialWidth/2)-this.container.getStyle('border').toInt())+this.options.offset.x }; } return this.openClosePos; }, open: function(el){ this.options.onOpen(); this.index = this.content.indexOf(el); this.openId = el.getProperty('id'); if(!this.opened){ this.opened = true; if(this.options.useOverlay){ this.overlay.show(); } this.container.setStyles(this.getOpenClosePos(el)); this.container.setStyles({ opacity: 0, display: 'block' }); if(this.options.fixedTop){ var top = this.options.fixedTop; }else{ var top = ((window.getHeight()/2)-(this.options.initialHeight/2)-this.container.getStyle('border').toInt())+this.options.offset.y; } this.containerEffects.start({ width: this.options.initialWidth, height: this.options.initialHeight, top: top, left: ((window.getWidth()/2)-(this.options.initialWidth/2)-this.container.getStyle('border').toInt())+this.options.offset.x, opacity: [0, 1] }); this.load(this.index); }else{ if (this.options.showControls) { this.hideControls(); } this.getOpenClosePos(this.content[this.index]); this.timer = this.hideContent.bind(this).delay(500); this.timer = this.load.pass(this.index, this).delay(1100); } }, getContent: function(index){ this.setContentType(this.content[index]); var desc = {}; if(this.options.descClassName){ this.descriptions.each(function(el,i){ if(el.hasClass(this.openId)){ desc = el.*****(); } },this); } //var title = this.content[index].title; this.contentToLoad = { title: this.content[index].title || ' ', //desc: $(this.options.descClassName+this.content[index].id).*****(), desc: desc, number: index+1 }; }, close: function(){ if(this.options.useOverlay){ this.overlay.hide(); } if (this.options.showControls) { this.hideControls(); } this.hideContent(); this.containerEffects.stop(); this.zoomOut.bind(this).delay(500); this.options.onClose(); }, zoomOut: function(){ this.containerEffects.start({ width: this.openClosePos.width, height: this.openClosePos.height, top: this.openClosePos.top, left: this.openClosePos.left, opacity: 0 }); this.reset.bind(this).delay(500); }, load: function(index){ this.box.addClass('MultiBoxLoading'); this.getContent(index); if(this.type == 'image'){ var xH = this.contentObj.xH; this.contentObj = new Asset.image(this.content[index].href, {onload: this.resize.bind(this)}); this.contentObj.xH = xH; /*this.contentObj = new Image(); this.contentObj.onload = this.resize.bind(this); this.contentObj.src = this.content[index].href;*/ }else{ this.resize(); } }, resize: function(){ if (this.options.fixedTop) { var top = this.options.fixedTop; } else { var top = ((window.getHeight() / 2) - ((Number(this.contentObj.height) + this.contentObj.xH) / 2) - this.container.getStyle('border').toInt() + window.getScrollTop()) + this.options.offset.y; } var left = ((window.getWidth() / 2) - (this.contentObj.width / 2) - this.container.getStyle('border').toInt()) + this.options.offset.x; if (top < 0) { top = 0 } if (left < 0) { left = 0 } this.containerEffects.stop(); this.containerEffects.start({ width: this.contentObj.width, height: Number(this.contentObj.height) + this.contentObj.xH, top: top, left: left, opacity: 1 }); this.timer = this.showContent.bind(this).delay(500); }, showContent: function(){ this.box.removeClass('MultiBoxLoading'); this.removeContent(); this.contentContainer = new Element('div').setProperties({id: 'MultiBoxContentContainer'}).setStyles({opacity: 0, width: this.contentObj.width+'px', height: (Number(this.contentObj.height)+this.contentObj.xH)+'px'}).injectInside(this.box); if(this.type == 'image'){ this.contentObj.injectInside(this.contentContainer); }else if(this.type == 'iframe'){ new Element('iframe').setProperties({ id: 'iFrame'+new Date().getTime(), width: this.contentObj.width, height: this.contentObj.height, src: this.contentObj.url, frameborder: 0, scrolling: 'auto' }).injectInside(this.contentContainer); }else if(this.type == 'htmlelement'){ this.elementContent.*****().setStyle('display','block').injectInside(this.contentContainer); }else if(this.type == 'ajax'){ new Ajax(this.contentObj.url, { method: 'get', update: 'MultiBoxContentContainer', evalScripts: true, autoCancel: true }).request(); }else{ var obj = this.createEmbedObject().injectInside(this.contentContainer); if(this.str != ''){ $('MultiBoxMediaObject').innerHTML = this.str; } } this.contentEffects = new Fx.Styles(this.contentContainer, {duration: 500, transition: Fx.Transitions.linear}); this.contentEffects.start({ opacity: 1 }); this.title.setHTML(this.contentToLoad.title); this.number.setHTML(this.contentToLoad.number+' of '+this.content.length); if (this.options.descClassName) { if (this.description.getFirst()) { this.description.getFirst().remove(); } this.contentToLoad.desc.injectInside(this.description).setStyles({ display: 'block' }); } //this.removeContent.bind(this).delay(500); if (this.options.showControls) { this.timer = this.showControls.bind(this).delay(800); } }, hideContent: function(){ this.box.addClass('MultiBoxLoading'); this.contentEffects.start({ opacity: 0 }); this.removeContent.bind(this).delay(500); }, removeContent: function(){ if($('MultiBoxMediaObject')){ $('MultiBoxMediaObject').empty(); $('MultiBoxMediaObject').remove(); } if($('MultiBoxContentContainer')){ //$('MultiBoxContentContainer').empty(); $('MultiBoxContentContainer').remove(); } }, showControls: function(){ this.clicked = false; if(this.container.getStyle('height') != 'auto'){ this.containerDefaults.height = this.container.getStyle('height') this.containerDefaults.backgroundColor = this.options.contentColor; } this.container.setStyles({ //'backgroundColor': this.controls.getStyle('backgroundColor'), 'height': 'auto' }); if(this.contentToLoad.number == 1){ this.previousButton.addClass('MultiBoxPreviousDisabled'); }else{ this.previousButton.removeClass('MultiBoxPreviousDisabled'); } if(this.contentToLoad.number == this.content.length){ this.nextButton.addClass('MultiBoxNextDisabled'); }else{ this.nextButton.removeClass('MultiBoxNextDisabled'); } this.controlEffects.start({'height': this.controls.getStyle('height')}); }, hideControls: function(num){ this.controlEffects.start({'height': 0}).chain(function(){ this.container.setStyles(this.containerDefaults); }.bind(this)); }, showThumbnails: function(){ }, next: function(){ if(this.index < this.content.length-1){ this.index++; this.openId = this.content[this.index].getProperty('id'); if (this.options.showControls) { this.hideControls(); } this.getOpenClosePos(this.content[this.index]); //this.getContent(this.index); this.timer = this.hideContent.bind(this).delay(500); this.timer = this.load.pass(this.index, this).delay(1100); } }, previous: function(){ if(this.index > 0){ this.index--; this.openId = this.content[this.index].getProperty('id'); if (this.options.showControls) { this.hideControls(); } this.getOpenClosePos(this.content[this.index]); //this.getContent(this.index); this.timer = this.hideContent.bind(this).delay(500); this.timer = this.load.pass(this.index, this).delay(1000); } }, createEmbedObject: function(){ if(this.type == 'flash'){ var url = this.contentObj.url; var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'}); this.str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" ' this.str += 'width="'+this.contentObj.width+'" '; this.str += 'height="'+this.contentObj.height+'" '; this.str += 'title="MultiBoxMedia">'; this.str += '<param name="movie" value="'+url+'" />' this.str += '<param name="quality" value="high" />'; this.str += '<embed src="'+url+'" '; this.str += 'quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" '; this.str += 'width="'+this.contentObj.width+'" '; this.str += 'height="'+this.contentObj.height+'"></embed>'; this.str += '</object>'; } if(this.type == 'flashVideo'){ //var url = this.contentObj.url.substring(0, this.contentObj.url.lastIndexOf('.')); var url = this.contentObj.url; var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'}); this.str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" ' this.str += 'width="'+this.contentObj.width+'" '; this.str += 'height="'+(Number(this.contentObj.height)+this.contentObj.xH)+'" '; this.str += 'title="MultiBoxMedia">'; this.str += '<param name="movie" value="'+this.options.path+'flvplayer.swf" />' this.str += '<param name="quality" value="high" />'; this.str += '<param name="salign" value="TL" />'; this.str += '<param name="scale" value="noScale" />'; this.str += '<param name="FlashVars" value="path='+url+'" />'; this.str += '<embed src="'+this.options.path+'flvplayer.swf" '; this.str += 'quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" '; this.str += 'width="'+this.contentObj.width+'" '; this.str += 'height="'+(Number(this.contentObj.height)+this.contentObj.xH)+'"'; this.str += 'salign="TL" '; this.str += 'scale="noScale" '; this.str += 'FlashVars="path='+url+'"'; this.str += '></embed>'; this.str += '</object>'; } if(this.type == 'flashMp3'){ var url = this.contentObj.url; var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'}); this.str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" ' this.str += 'width="'+this.contentObj.width+'" '; this.str += 'height="'+this.contentObj.height+'" '; this.str += 'title="MultiBoxMedia">'; this.str += '<param name="movie" value="'+this.options.path+'mp3player.swf" />' this.str += '<param name="quality" value="high" />'; this.str += '<param name="salign" value="TL" />'; this.str += '<param name="scale" value="noScale" />'; this.str += '<param name="FlashVars" value="path='+url+'" />'; this.str += '<embed src="'+this.options.path+'mp3player.swf" '; this.str += 'quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" '; this.str += 'width="'+this.contentObj.width+'" '; this.str += 'height="'+this.contentObj.height+'"'; this.str += 'salign="TL" '; this.str += 'scale="noScale" '; this.str += 'FlashVars="path='+url+'"'; this.str += '></embed>'; this.str += '</object>'; } if(this.type == 'quicktime'){ var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'}); this.str = '<object type="video/quicktime" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab"'; this.str += ' width="'+this.contentObj.width+'" height="'+this.contentObj.height+'">'; this.str += '<param name="src" value="'+this.contentObj.url+'" />'; this.str += '<param name="autoplay" value="true" />'; this.str += '<param name="controller" value="true" />'; this.str += '<param name="enablejavascript" value="true" />'; this.str += '<embed src="'+this.contentObj.url+'" autoplay="true" pluginspage="http://www.apple.com/quicktime/download/" width="'+this.contentObj.width+'" height="'+this.contentObj.height+'"></embed>'; this.str += '<object/>'; } if(this.type == 'windowsMedia'){ var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'}); this.str = '<object type="application/x-oleobject" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"'; this.str += ' width="'+this.contentObj.width+'" height="'+this.contentObj.height+'">'; this.str += '<param name="filename" value="'+this.contentObj.url+'" />'; this.str += '<param name="Showcontrols" value="true" />'; this.str += '<param name="autoStart" value="true" />'; this.str += '<embed type="application/x-mplayer2" src="'+this.contentObj.url+'" Showcontrols="true" autoStart="true" width="'+this.contentObj.width+'" height="'+this.contentObj.height+'"></embed>'; this.str += '<object/>'; } if(this.type == 'real'){ var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'}); this.str = '<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"'; this.str += ' width="'+this.contentObj.width+'" height="'+this.contentObj.height+'">'; this.str += '<param name="src" value="'+this.contentObj.url+'" />'; this.str += '<param name="controls" value="ImageWindow" />'; this.str += '<param name="autostart" value="true" />'; this.str += '<embed src="'+this.contentObj.url+'" controls="ImageWindow" autostart="true" width="'+this.contentObj.width+'" height="'+this.contentObj.height+'"></embed>'; this.str += '<object/>'; } return obj; } }); MultiBox.implement(new Options); MultiBox.implement(new Events); /*************************************************************/ [/CODE] Danke an euch fuer jede Hilfe! [/QUOTE]
Bilder bitte
hier hochladen
und danach über das Bild-Icon (Direktlink vorher kopieren) platzieren.
Zitate einfügen…
Authentifizierung
Wenn ★ = 12, ◇ = 4 und die Hälfte von ★ zu ◇ addiert wird, was ist das Ergebnis?
Antworten
Start
Forum
Sonstiges
Webdesign, Webentwicklung & Programmierung
PHP, Javascript, jQuery, Ajax, nodeJS, MySQL...
JS ohne Link aktivieren
Oben