Closed Thread Icon

Topic awaiting preservation: evaluate (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=8096" title="Pages that link to Topic awaiting preservation: evaluate (Page 1 of 1)" rel="nofollow" >Topic awaiting preservation: evaluate <span class="small">(Page 1 of 1)</span>\

 
tariq
Nervous Wreck (II) Inmate

From:
Insane since: Feb 2002

posted posted 02-26-2002 11:07

I wrote a script which should work under both ie and ns.
after I define some variables like:
if (ns) {
lst = "document.";
lse = "";
llt = ".left";
ltp = ".top";
clw = ".clip.width";
lvy = ".visibility"; }

if (gecko &#0124; &#0124; ie){
lst = "document.getElementById('";
lse = "').style";
llt = ".left";
ltp = ".top";
clw = ".clip.width";
lvy = ".visibility"; } .
//-->

wrote afunction called moveEnd():
function moveEnd() {
xendA=xend+xendO;
eval(lst+"ende"+lvy+" = 'visible'");
eval(lst+"ende"+llt+" = xendA");
xend=xendA;
w++
if (w<=7){
setTimeout("moveEnd()",50);
}
else { end();}
}
//-->
The problrm is that ie does not execute the script: It has aproblem with :
[eval(lst+"ende"+lvy+" = 'visible'");]
has any of U an idea?

lallous
Paranoid (IV) Inmate

From: Lebanon
Insane since: May 2001

posted posted 02-26-2002 11:55

IE ?

if:
lst = "document.getElementById('";
lse = "').style";

and you're using:

eval(lst+"ende"+lvy+" = 'visible'");

then i see you're not closing the ')' opened by the 'lst'

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 02-26-2002 20:54

You're not enclosing the ID name in quotes, either.

This is a very messy way to go about this in general.

tariq
Nervous Wreck (II) Inmate

From:
Insane since: Feb 2002

posted posted 02-27-2002 12:33

how would U do it?

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 02-27-2002 14:50

I'm short on time (8 min left), but I'll see if I can whip something up real quick...

var leftstr = "left";
var topstr = "top";
var hidden = "hidden";
var visible = "visible";
if (ie) {leftstr = "pixelLeft"; topstr = "pixelTop";}
if (ns) {hidden = "hide"; visible = "show";}

function getObj(id)
{
if (ns) return document[id];
else if (gecko &#0124; &#0124; ie) return document.getElementById(id).style;
}

function moveEnd() {
xendA = xend+xend0; // just copied this from your code
// ende might be supposed to be in quotes in the next two lines, i'm not sure because i don't have enough of your code...
getObj(ende).visibility = visible;
getObj(ende)[leftstr] = xendA;

xend=xendA;
w++;
if (w<8){
setTimeout("moveEnd()",50);
}
else { end();}
}

gotta run =)

« BackwardsOnwards »

Show Forum Drop Down Menu