Here is a part of javascript code that works well in FF2 but shows
above error in IE6 and error "missing name after . operator" in NS8
Expand|Select|Wrap|Line Numbers
- function PopUp(idf,stepX,stepY,speed){
- this.idf=idf;
- this.popXStep=stepX;
- this.popYStep=stepY;
- this.popSpeed=speed;
- this.popLeft=0;
- this.popTop=0;
- };
- PopUp.prototype.relocX=function() {
- if(xon==0){this.popLeft=this.popLeft-this.popXStep;}
- else{this.popLeft=this.popLeft+this.popXStep;}
- if(this.popLeft<0){xon=1;this.popLeft=0;}
- if(this.popLeft>=(chX-ohX)){xon=0;this.popLeft=(chX-ohX);}
- if(ie){
- window.alert("here!");
- this.idf.style.left=this.popLeft
- +document.body.scrollLeft;
- this.idf.style.top=this.popTop;
- }
- else if (ns4){
- document.(this.idf).pageX=this.popLeft
- +window.pageXOffset;
- document.(this.idf).pageY=this.popTop;
- }
- else if (ns6){
- document.getElementById(this.idf).style.left=this.
- popLeft+window.pageXOffset
- document.getElementById(this.idf).style.top=this.p
- opTop
- }
- };
Here is the error copied from NS JS Console:
Error: missing name after . operator
Source File: file:///C:/templates/test.html
Line: 105, Column: 17
Source Code:
document.(this.idf).pageX=this.popLeft+window.page XOffset;
Well it's not because of a reserved word use. Its an addition in my
project,
I am generating a no. of pop ups on one page. Deadline is in 10 hrs!
Can someone please help?