|
|
JavaScript Code |
1 2 3 4 5 6 |
function getHTML(url,param) { var url = url; var pars = param; var myAjax = new Ajax.Updater({success: 'content'}, url, { method: 'get', parameters: pars, onFailure: reportError }); } |

|
|
JavaScript Code |
1 |
link.onclick = function () {myLightbox.start(this); return false;} |
|
|
JavaScript Code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
function pollContent(id){ if (document.getElementById&&document.getElementById(id)){ alert(id); var targetObj = document.getElementById(id); var anchors = targetObj.getElementsByTagName('a'); for (var i=0; i<anchors.length; i++) { alert(i); var anchor = anchors[i]; var relAttribute = String(anchor.getAttribute('rel')); if (anchor.getAttribute('href') && (relAttribute.toLowerCase().match('lightbox'))){ anchor.onclick = function () {myLightbox.start(this); return false;} } } }else{ alert("nochmal"); setTimeout("pollContent('"+id+"')", 1000) } } |
|
|
HTML Code |
1 |
|

sorry.. ein letztes mal.. jetzt gehts.. zwar komisch aber geht halt|
|
JavaScript Code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
function pollContent(id){ if (document.getElementById&&document.getElementById(id)){ setTimeout("wait('"+id+"')", 1500); }else{ setTimeout("pollContent('"+id+"')", 1000) } } function wait(id){ if (navigator.appVersion.indexOf("MSIE")!=-1){ pause(50); }; var targetObj = document.getElementById(id); var anchors = targetObj.getElementsByTagName('a'); for (var i=0; i<anchors.length; i++) { var anchor = anchors[i]; var relAttribute = String(anchor.getAttribute('rel')); if (anchor.getAttribute('href') && (relAttribute.toLowerCase().match('lightbox'))){ //alert('ja'); anchor.onclick = function () {myLightbox.start(this); return false;} } } } /* nur beim ie benötigt */ function pause(numberMillis) { var now = new Date(); var exitTime = now.getTime() + numberMillis; while (true) { now = new Date(); if (now.getTime() > exitTime) return; } } |
|
|
JavaScript Code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
var ff = function() { var id = 'xx'; if (document.getElementById&&document.getElementById(id)){ alert(id); var targetObj = document.getElementById(id); var anchors = targetObj.getElementsByTagName('a'); for (var i=0; i<anchors.length; i++) { alert(i); var anchor = anchors[i]; var relAttribute = String(anchor.getAttribute('rel')); if (anchor.getAttribute('href') && (relAttribute.toLowerCase().match('lightbox'))){ anchor.onclick = function () {myLightbox.start(this); return false;} } } }else{ alert("nochmal"); setTimeout("pollContent('"+id+"')", 1000) } } if(enableCache){ jsCache[url] = dynamicContent_ajaxObjects[ajaxIndex].response; } dynamicContent_ajaxObjects[ajaxIndex] = false; ajax_parseJs(targetObj) } |
|
|
JavaScript Code |
1 |
var myAjax = new Ajax.Updater({onSuccess: ff}, .... |
|
|
JavaScript Code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
<script language="JavaScript"> //Effect.Fade('content'); //Effect.Fade('systemWorking'); //Effect.Appear('systemWorking'); //Effect.Appear('content'); var myGlobalHandlers = { onCreate: function(){ //Effect.Fade('content',{duration: 1}); Element.hide('content'); //alert('show systemworking'); Element.show('systemWorking'); }, onComplete: function() { if(Ajax.activeRequestCount == 0){ Effect.Fade('systemWorking'); //Element.hide('systemWorking'); //alert('hide systemworking'); //alert('show content'); Effect.Appear('content',{duration: 1}); //Element.show('content'); } } }; Ajax.Responders.register(myGlobalHandlers); function getHTML(url,param) { var url = url; var pars = param; var myAjax = new Ajax.Updater({success: ff(url)}, url, { method: 'get', parameters: pars, onFailure: reportError }); } function reportError(request) { $('systemWorking').innerHTML = request.responseText; } function ff(){ var id = 'content'; var targetObj = document.getElementById(id); var anchors = targetObj.getElementsByTagName('a'); alert(id); for (var i=0; i<anchors.length; i++) { alert(i); var anchor = anchors[i]; var relAttribute = String(anchor.getAttribute('rel')); if (anchor.getAttribute('href') && (relAttribute.toLowerCase().match('lightbox'))){ alert('ja'); anchor.onclick = function () {myLightbox.start(this); return false;} } } } |
|
|
JavaScript Code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
function ff(){ var id = 'content'; var targetObj = document.getElementById(id); var anchors = targetObj.getElementsByTagName('a'); for (var i=0; i<anchors.length; i++) { var anchor = anchors[i]; var relAttribute = String(anchor.getAttribute('rel')); if (anchor.getAttribute('href') && (relAttribute.toLowerCase().match('lightbox'))){ alert(anchor); anchor.onclick = function () {myLightbox.start(this); return false;} } } return id; } |
|
|
HTML Code |
1 |
|
|
|
HTML Code |
1 |
<a href="#" onclick="...">...</a> |

|
|
HTML Code |
1 |
<a onmouseover="ff();" rel="lightbox" href="bild.jpg"><img src=bild_klein.jpg></a> |
|
|
JavaScript Code |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
function ff(){ var id = 'content'; if (document.getElementById&&document.getElementById(id)){ //alert(id); var targetObj = document.getElementById(id); var anchors = targetObj.getElementsByTagName('a'); for (var i=0; i<anchors.length; i++) { var anchor = anchors[i]; var relAttribute = String(anchor.getAttribute('rel')); if (anchor.getAttribute('href') && (relAttribute.toLowerCase().match('lightbox'))){ //alert(anchor); anchor.onclick = function () {myLightbox.start(this); return false;} } } } } |