hallo,
ich versuche nun schon mehr als 2 Stunden,
eine Variable erst nach einem click auf einen Button oder Textlink zu Übergeben. Vergebend.....
Deswegen bin ich nun hier !
* Kurz dazu gesagt ich mache das nicht Proffesionel, sondern einfach mehr nur zum "Zeitvertreib"*
hier der Code:
<head>
<meta http-equiv="Content-Language" content="de">
</head>
<script type="text/javascript">
var popWidth = 800;
var popHeight = 500;
// the [url=http://www.computerhilfen.de/fachbegriffe-u-URL.html][b]url[/b][/url] for frame
var adUrl = 'http://google.de/adurl';
// [url=http://www.computerhilfen.de/fachbegriffe-u-URL.html][b]url[/b][/url] for click
var clickUrl = '';
var titleUrl = '';
// title to [url=http://www.computerhilfen.de/fachbegriffe-d-Display.html][b]display[/b][/url] in upper bar
var adTitle = ''
// script init time
var initTime = 1000;
// maximum wait time for iframe load before animation start
var theTime = 7000;
var animStarted = 0;
var jTimeout = null;
var jImageHost = '';
//var jImageHost = 'http://xy.de/';
// diplay fading animation
var fadingAnim = true;
// [url=http://www.computerhilfen.de/fachbegriffe-d-Display.html][b]display[/b][/url] resizing animation
var resizingAnim = true;
// [url=http://www.computerhilfen.de/fachbegriffe-d-Display.html][b]display[/b][/url] upper [url=http://www.computerhilfen.de/fachbegriffe-h-Header.html][b]header[/b][/url] animation
var headerAnim = false;
// start headerAnim after time:
var headerAnimTime = 4000;
// [url=http://www.computerhilfen.de/fachbegriffe-d-Display.html][b]display[/b][/url] upper bottom animation
var bottomAnim = false;
// open pop mode
// 0 - open in background,
// 1 - open in foreground
var popMode = 0;
var popModeTxt = 'background';
var JPopImages = new Array();
JPopImages['up_left'] = new Image();
JPopImages['up_left'].src = '';
JPopImages['up_middle'] = new Image();
JPopImages['up_middle'].src = '';
JPopImages['up_right'] = new Image();
JPopImages['up_right'].src = '';
JPopImages['down_left'] = new Image();
JPopImages['down_left'].src = '';
JPopImages['down_right'] = new Image();
JPopImages['down_right'].src = '';
JPopImages['icon_close'] = new Image();
JPopImages['icon_close'].src = '';
JPopImages['icon_open'] = new Image();
JPopImages['icon_open'].src = '';
JPopImages['icon_star'] = new Image();
JPopImages['icon_star'].src = '';
JPopImages['icon_star_hov'] = new Image();
JPopImages['icon_star_hov'].src = '';
JPopImages['icon_close_hov'] = new Image();
JPopImages['icon_close_hov'].src = '';
JPopImages['icon_open_hov'] = new Image();
JPopImages['icon_open_hov'].src = '';
JPopImages['icon_close_2'] = new Image();
JPopImages['icon_close_2'].src = '';
JPopImages['icon_open_2'] = new Image();
JPopImages['icon_open_2'].src = '';
JPopImages['icon_star_2'] = new Image();
JPopImages['icon_star_2'].src = '';
JPopImages['blank'] = new Image();
JPopImages['blank'].src = '';
function getPageScroll(){
var yScroll;
if (self.pageYOffset) {
yScroll = self.pageYOffset;
} else if (document.documentElement && document.documentElement.scrollTop){
yScroll = document.documentElement.scrollTop;
} else if (document.body) {
yScroll = document.body.scrollTop;
}
return yScroll;
}
function getPageSize(){
var xScroll, yScroll;
if (window.innerHeight && window.scrollMaxY) {
xScroll = document.body.scrollWidth;
yScroll = window.innerHeight + window.scrollMaxY;
} else if (document.body.scrollHeight > document.body.offsetHeight){
xScroll = document.body.scrollWidth;
yScroll = document.body.scrollHeight;
} else {
xScroll = document.body.offsetWidth;
yScroll = document.body.offsetHeight;
}
var windowWidth, windowHeight;
if (self.innerHeight) {
windowWidth = self.innerWidth;
windowHeight = self.innerHeight;
} else if (document.documentElement && document.documentElement.clientHeight) {
windowWidth = document.documentElement.clientWidth;
windowHeight = document.documentElement.clientHeight;
} else if (document.body) { windowWidth = document.body.clientWidth;
windowHeight = document.body.clientHeight;
}
if(yScroll < windowHeight){
pageHeight = windowHeight;
} else {
pageHeight = yScroll;
}
if(xScroll < windowWidth){
pageWidth = windowWidth;
} else {
pageWidth = xScroll;
}
arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight)
return arrayPageSize;
}
// end
//
//
//
var Class = {
create: function() {
return function() {
this.initialize.apply(this, arguments);
}
}
};
Object.extend = function(destination, source) {
for (var property in source) destination[property] = source[property];
return destination;
};
Function.prototype.bind = function(object) {
var __method = this;
return function() {
return __method.apply(object, arguments);
}
};
String.prototype.camelize = function(){
return this.replace(/-\D/gi, function(match){
return match.charAt(match.length - 1).toUpperCase();
});
};
function $() {
if (arguments.length == 1) return get$(arguments[0]);
var elements = [];
$c(arguments).each(function(el){
elements.push(get$(el));
});
return elements;
function get$(el){
if (typeof el == 'string') el = document.getElementById(el);
return el;
}
};
if (!window.Element) var Element = {};
// end
//
//
var Fx = fx = {};
Fx.Base = function(){};
Fx.Base.prototype = {
setOptions: function(options){
this.options = Object.extend({
onStart: function(){},
onComplete: function(){},
transition: Fx.Transitions.sineInOut,
duration: 500,
unit: 'px',
wait: true,
fps: 50
}, options || {});
},
step: function(){
var time = new Date().getTime();
if (time < this.time + this.options.duration){
this.cTime = time - this.time;
this.setNow();
} else {
setTimeout(this.options.onComplete.bind(this, this.element), 10);
this.clearTimer();
this.now = this.to;
}
this.increase();
},
setNow: function(){
this.now = this.compute(this.from, this.to);
},
compute: function(from, to){
var change = to - from;
return this.options.transition(this.cTime, from, change,this.options.duration);
},
clearTimer: function(){
clearInterval(this.timer);
this.timer = null;
return this;
},
_start: function(from, to){
if (!this.options.wait) this.clearTimer();
if (this.timer) return;
setTimeout(this.options.onStart.bind(this, this.element), 10);
this.from = from;
this.to = to;
this.time = new Date().getTime();
this.timer = setInterval(this.step.bind(this),Math.round(1000/this.options.fps));
return this;
},
custom: function(from, to){
return this._start(from, to);
},
set: function(to){
this.now = to;
this.increase();
return this;
},
hide: function(){
return this.set(0);
},
setStyle: function(e, p, v){
if (p == 'opacity'){
if (v == 0 && e.style.visibility != "hidden") e.style.visibility = "hidden";
else if (e.style.visibility != "visible") e.style.visibility = "visible";
if (window.ActiveXObject) e.style.filter = "alpha(opacity=" + v*100 + ")";
e.style.MozOpacity = v;
e.style.opacity = v;
} else e.style[p] = v+this.options.unit;
}
};
Fx.Style = Class.create();
Fx.Style.prototype = Object.extend(new Fx.Base(), {
initialize: function(el, property, options){
this.element = $(el);
this.setOptions(options);
this.property = property.camelize();
},
increase: function(){
this.setStyle(this.element, this.property, this.now);
}
});
Fx.Styles = Class.create();
Fx.Styles.prototype = Object.extend(new Fx.Base(), {
initialize: function(el, options){
this.element = $(el);
this.setOptions(options);
this.now = {};
},
setNow: function(){
for (p in this.from) this.now[p] = this.compute(this.from[p], this.to[p]);
},
custom: function(obj){
if (this.timer && this.options.wait) return;
var from = {};
var to = {};
for (p in obj){
from[p] = obj[p][0];
to[p] = obj[p][1];
}
return this._start(from, to);
},
increase: function(){
for (var p in this.now) this.setStyle(this.element, p, this.now[p]);
}
});
//
//
Fx.Transitions = {
linear: function(t, b, c, d) { return c*t/d + b; },
sineInOut: function(t, b, c, d) { return -c/2 *(Math.cos(Math.PI*t/d) - 1) + b; },
quadOut: function(t, b, c, d){ return -c *(t/=d)*(t-2) + b; },
quintOut: function(t, b, c, d){ return c*((t=t/d-1)*t*t*t*t + 1) + b; }
};
// end