473,322 Members | 1,523 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

eval


why won't the following work

for(var i=0;i<pics;i++){
eval('img'+i) = new Image(wth,hgt)
eval('img'+i+'.src') = 'http://www.mypics/'+i+'1.gif'
}

basically I am trying to create a numer of placeholders with thier
associated imgages!

thanks in advance
stuart
Jul 20 '05 #1
33 3683
> why won't the following work

for(var i=0;i<pics;i++){
eval('img'+i) = new Image(wth,hgt)
eval('img'+i+'.src') = 'http://www.mypics/'+i+'1.gif'
}


Where did you get this code?

Jul 20 '05 #2

Douglas Crockford <no****@laserlink.net> wrote in message
news:55***************************@msgid.meganewss ervers.com...
why won't the following work

for(var i=0;i<pics;i++){
eval('img'+i) = new Image(wth,hgt)
eval('img'+i+'.src') = 'http://www.mypics/'+i+'1.gif'
}


Where did you get this code?


It is part of a bigger script that I am writting, the problem that I am
facing is that I cannot asign the src value to a constucted variable

I need to create a variable amount of placeholders and cache images such as

img1 = new Image(100,200)
img1.src = 'someURL'
img2 = new Image(100,200)
img2.src = 'someURL'
img3 = new Image(100,200)
img3.src = 'someURL'

I am trying to construct the placeholder through a loop as folows

for(var i=1;i<pics;i++){
( img + i ) = new Image(100,200)
(img + i).src = 'someURL'
}

what I don't know is how to join img and i


Jul 20 '05 #3
Stuart wrote:
why won't the following work
Because it's evil[tm] eval(...). Besides, you are neither telling what you
are consider working nor what `pics' aso. are. Nevertheless, despite its
bad style, the below code does create Image objects and assigns a value to
their `src' property, so I consider it working.
for(var i=0;i<pics;i++){
eval('img'+i) = new Image(wth,hgt)
eval('img'+i+'.src') = 'http://www.mypics/'+i+'1.gif'
}

basically I am trying to create a numer of placeholders with thier
associated imgages!


Provided that `pics' stores the number of Image objects to create, that
`wth' and `hgt' are values for the width and height of *each* object and
that the image resources to be accessed are available via the URLs
http://www.mypics/X1.gif, where X is a number from 0 to pics - 1, use

var myImages = new Object();
for (var i = 0; i < pics; i++)
{
myImages['img' + i] = new Image(wth, hgt);
myImages['img' + i].src = 'http://www.mypics/' + i + '1.gif';
}

instead.
PointedEars

Jul 20 '05 #4
> > > why won't the following work

for(var i=0;i<pics;i++){
eval('img'+i) = new Image(wth,hgt)
eval('img'+i+'.src') = 'http://www.mypics/'+i+'1.gif'
}


Where did you get this code?


It is part of a bigger script that I am writting, the problem that I am
facing is that I cannot asign the src value to a constucted variable


Who told you to use eval()?

Jul 20 '05 #5
Thomas 'PointedEars' Lahn wrote:
Stuart wrote:
why won't the following work


Because it's evil[tm] eval(...). Besides, you are neither telling what you
are consider working nor what `pics' aso. are. Nevertheless, despite its
bad style, the below code does create Image objects and assigns a value to
their `src' property, so I consider it working.
for(var i=0;i<pics;i++){
eval('img'+i) = new Image(wth,hgt)
eval('img'+i+'.src') = 'http://www.mypics/'+i+'1.gif'
}


Hm, having tested it in Mozilla 1.5b and IE 6.0 SP-1, I'm getting a script
error because eval(...) isn't allowed as left-hand side expression (IE says
explicitely: "Cannot assign to a result of a function" (or similar,
translated it from German). Maybe I'm mixing up something here, but I
remember ECMAScript implementations where it was possible to use it there.
However, it's still bad style.
PointedEars

Jul 20 '05 #6

Douglas Crockford <no****@laserlink.net> wrote in message
news:8a**************************@msgid.meganewsse rvers.com...
> why won't the following work
>
> for(var i=0;i<pics;i++){
> eval('img'+i) = new Image(wth,hgt)
> eval('img'+i+'.src') = 'http://www.mypics/'+i+'1.gif'
> }

Where did you get this code?


It is part of a bigger script that I am writting, the problem that I am
facing is that I cannot asign the src value to a constucted variable


Who told you to use eval()?

I am trying anything....including asking you!
Are you getting the jist of what I am trying to achieve?
Jul 20 '05 #7

Thomas 'PointedEars' Lahn <Po*********@web.de> wrote in message
news:bo*************@ID-107532.news.uni-berlin.de...
Thomas 'PointedEars' Lahn wrote:
Stuart wrote:
why won't the following work
Because it's evil[tm] eval(...). Besides, you are neither telling what you are consider working nor what `pics' aso. are. Nevertheless, despite its
bad style, the below code does create Image objects and assigns a value to their `src' property, so I consider it working.
for(var i=0;i<pics;i++){
eval('img'+i) = new Image(wth,hgt)
eval('img'+i+'.src') = 'http://www.mypics/'+i+'1.gif'
}


Hm, having tested it in Mozilla 1.5b and IE 6.0 SP-1, I'm getting a script
error because eval(...) isn't allowed as left-hand side expression (IE

says explicitely: "Cannot assign to a result of a function" (or similar,
translated it from German). Maybe I'm mixing up something here, but I
remember ECMAScript implementations where it was possible to use it there.
However, it's still bad style.

Yes, I am getting these exact same errors,. However, I am pleased you
understood what I am trying to do, May be it is "bad style" but I am new to
javaScript, so may be you could point me in the way of "Good Style" and the
correct way of scripting.
Jul 20 '05 #8
Lee
Stuart said:


Douglas Crockford <no****@laserlink.net> wrote in message
news:55***************************@msgid.meganews servers.com...
> why won't the following work
>
> for(var i=0;i<pics;i++){
> eval('img'+i) = new Image(wth,hgt)
> eval('img'+i+'.src') = 'http://www.mypics/'+i+'1.gif'
> }


Where did you get this code?


It is part of a bigger script that I am writting, the problem that I am
facing is that I cannot asign the src value to a constucted variable

I need to create a variable amount of placeholders and cache images such as

img1 = new Image(100,200)
img1.src = 'someURL'
img2 = new Image(100,200)
img2.src = 'someURL'
img3 = new Image(100,200)
img3.src = 'someURL'

I am trying to construct the placeholder through a loop as folows

for(var i=1;i<pics;i++){
( img + i ) = new Image(100,200)
(img + i).src = 'someURL'
}

what I don't know is how to join img and i


Whenever you find yourself using eval(), you've probably
overlooked a simpler way to do something.

var img=new Array();
for(var i=0;i<pics;i++){
img[i] = new Image(100,200);
img[i].src = 'someURL';
}

Jul 20 '05 #9
> > Who told you to use eval()?

I am trying anything....including asking you!
Are you getting the jist of what I am trying to achieve?


It is almost always extremely wrong to use eval(). Who is teaching you to
program so badly?

Jul 20 '05 #10

"Stuart" <kf****@yytd.gft> schreef in bericht
news:bo**********@newsg4.svr.pol.co.uk...

I am trying to construct the placeholder through a loop as folows

for(var i=1;i<pics;i++){
( img + i ) = new Image(100,200)
(img + i).src = 'someURL'
}

what I don't know is how to join img and i


Try it as follows:

for(var i=1;i<pics;i++){
window['img' + i] = new Image(100,200)
window['img' + i].src = 'someURL'
}
JW

Jul 20 '05 #11
Stuart wrote:

[Repaired quoting, please read
http://home.in.tum.de/~jain/software/oe-quotefix/]
Thomas 'PointedEars' Lahn <Po*********@web.de> wrote [...]
Thomas 'PointedEars' Lahn wrote:
[...] May be it is "bad style" but I am new to
javaScript, so may be you could point me in the way of "Good Style" and the
correct way of scripting.


I already did, what part of it did you not understand?

Maybe if you would shorten the quotes to what is required for following the
discussion, which saves disk space and bandwidth, and eases reading, you
were forced to read postings more thoroughly:

http://www.albion.com/netiquette/corerules.html
PointedEars

Jul 20 '05 #12
Stuart wrote:
Thomas 'PointedEars' Lahn <Po*********@web.de> wrote [...]
However, [eval(...) is] still bad style.


[...] May be it is "bad style" but I am new to javaScript, so may be you
could point me in the way of "Good Style" and the correct way of
scripting.


I already did, what part of it did you not understand?

Maybe if you would shorten the quotes to what is required for following the
discussion, which saves disk space and bandwidth, and eases reading, you
were forced to read postings more thoroughly:

http://www.albion.com/netiquette/corerules.html
HTH

PointedEars

Jul 20 '05 #13
Many thanks Lee.....works perfectly

thanks again
Stuart
Lee <RE**************@cox.net> wrote in message
news:bo********@drn.newsguy.com...
Stuart said:


Douglas Crockford <no****@laserlink.net> wrote in message
news:55***************************@msgid.meganews servers.com...
> why won't the following work
>
> for(var i=0;i<pics;i++){
> eval('img'+i) = new Image(wth,hgt)
> eval('img'+i+'.src') = 'http://www.mypics/'+i+'1.gif'
> }

Where did you get this code?


It is part of a bigger script that I am writting, the problem that I am
facing is that I cannot asign the src value to a constucted variable

I need to create a variable amount of placeholders and cache images such as
img1 = new Image(100,200)
img1.src = 'someURL'
img2 = new Image(100,200)
img2.src = 'someURL'
img3 = new Image(100,200)
img3.src = 'someURL'

I am trying to construct the placeholder through a loop as folows

for(var i=1;i<pics;i++){
( img + i ) = new Image(100,200)
(img + i).src = 'someURL'
}

what I don't know is how to join img and i


Whenever you find yourself using eval(), you've probably
overlooked a simpler way to do something.

var img=new Array();
for(var i=0;i<pics;i++){
img[i] = new Image(100,200);
img[i].src = 'someURL';
}

Jul 20 '05 #14

Douglas Crockford <no****@laserlink.net> wrote in message
news:2a***************************@msgid.meganewss ervers.com...
Who told you to use eval()?

I am trying anything....including asking you!
Are you getting the jist of what I am trying to achieve?


It is almost always extremely wrong to use eval(). Who is teaching you to
program so badly?


And your input has been ?????

Jul 20 '05 #15

Thomas 'PointedEars' Lahn <Po*********@web.de> wrote in message
news:bo*************@ID-107532.news.uni-berlin.de...
Stuart wrote:
Thomas 'PointedEars' Lahn <Po*********@web.de> wrote [...]
However, [eval(...) is] still bad style.
[...] May be it is "bad style" but I am new to javaScript, so may be you
could point me in the way of "Good Style" and the correct way of
scripting.


I already did, what part of it did you not understand?


I see nothing worthwhile that you have sugested!

Maybe if you would shorten the quotes to what is required for following the discussion, which saves disk space and bandwidth, and eases reading, you
were forced to read postings more thoroughly:

If you are so concerned about bandwidth, why have you posted a somewhat
pointless reply TWICE ??


Jul 20 '05 #16
Stuart wrote:
Thomas 'PointedEars' Lahn <Po*********@web.de> wrote [...]
Stuart wrote:
> [...] May be it is "bad style" but I am new to javaScript, so may be you
> could point me in the way of "Good Style" and the correct way of
> scripting.


I already did, what part of it did you not understand?


I see nothing worthwhile that you have sugested!


You may want to re-read <news:bo*************@ID-107532.news.uni-berlin.de>
Maybe if you would shorten the quotes to what is required for following

the

^^
Your newsreader is b0rken. Please read
http://home.in.tum.de/~jain/software/oe-quotefix/
and fix it.
discussion, which saves disk space and bandwidth, and eases reading, you
were forced to read postings more thoroughly:


If you are so concerned about bandwidth, why have you posted a somewhat
pointless reply TWICE ??


I did not. Please get informed about control messages like Cancel.
And BTW, it would do you no harm to get informed about Usenet and
the recommended behaviour in this discussion medium anyway before
accusing people of spamming you that are actually trying to help
you, despite a lack of minimum clue about the topic on your side.
PointedEars, Score adjusted

Jul 20 '05 #17
> > > > Who told you to use eval()?
>
I am trying anything....including asking you!
Are you getting the jist of what I am trying to achieve?
It is almost always extremely wrong to use eval().
Who is teaching you to program so badly?

And your input has been ?????


My input is that you should file a lawsuit against whoever it was who taught you
to program. I think you may be entitled to significant damages.

Jul 20 '05 #18
In article <bo*************@ID-107532.news.uni-berlin.de>, Thomas 'PointedEars'
Lahn <Po*********@web.de> writes:
Because it's evil[tm] eval(...).


eval, in and of itself, is not evil. Its mis-use and the mis-understanding of
its appropriate use is what makes it evil. I know of at least 2 places where
its use is actually *good* .
--
Randy
Jul 20 '05 #19
hi************@aol.com (HikksNotAtHome) writes:
eval, in and of itself, is not evil. Its mis-use and the mis-understanding of
its appropriate use is what makes it evil. I know of at least 2 places where
its use is actually *good* .


Let us hear :)

/L 'I use it too, but only in one place'
--
Lasse Reichstein Nielsen - lr*@hotpop.com
JS Test Bench: <URL:http://www.infimum.dk/HTML/javascript/jstest6.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #20
"Stuart" <kf****@yytd.gft> wrote in message
news:bo**********@newsg2.svr.pol.co.uk...
Many thanks Lee.....works perfectly

<snip>
>for(var i=0;i<pics;i++){
> eval('img'+i) = new Image(wth,hgt)
> eval('img'+i+'.src') = 'http://www.mypics/'+i+'1.gif'

<snip>

What you are attempting is property access based on the result of
evaluating an expression. That is a common misuse of eval and never
necessary as JavaScript has this capability built in to its square
bracket property accessor syntax. See:-

<URL: http://jibbering.com/faq/#FAQ4_39 >

- and the linked article for more information.

Although, in this particular context where the only variable part of the
expression is an integer that acts as an index, Lee's Array based
approach is better suited to the problem.

Richard.
Jul 20 '05 #21
On Wed, 05 Nov 2003 23:31:44 +0100
Thomas 'PointedEars' Lahn <Po*********@web.de> wrote:
Stuart wrote:

<snip>
why have you posted a somewhat
pointless reply TWICE ??


I did not. Please get informed about control messages like Cancel.

<snip>

Yes, you did. You should get informed when Cancel works and when it
doesn't.

--
Life is an offensive, directed against the repetitious mechanism of the
Universe.
--Alfred North Whitehead (1861-1947)
Jul 20 '05 #22
In article <ek**********@hotpop.com>, Lasse Reichstein Nielsen <lr*@hotpop.com>
writes:
hi************@aol.com (HikksNotAtHome) writes:
eval, in and of itself, is not evil. Its mis-use and the mis-understanding

of
its appropriate use is what makes it evil. I know of at least 2 places

where
its use is actually *good* .


Let us hear :)


The first one, John Stocktons site has a textarea for input of script to test
it. When testing it, it seems to be the best way to do it (using eval).

The other one was a problem I had a while back (it was discussed here) where I
had a select list that had fractions as its value. The fractions were random in
the sense that they weren't always the same denominator. The problem was trying
to convert the fraction to a decimal. It turned out that, in some browsers,
eval performed at the same level as splitting on the / and then dividing.

Where's the one place you use it?
--
Randy
Jul 20 '05 #23
"Lasse Reichstein Nielsen" <lr*@hotpop.com> wrote in message
news:ek**********@hotpop.com...
hi************@aol.com (HikksNotAtHome) writes:
eval, in and of itself, is not evil. Its mis-use and the
mis-understanding of its appropriate use is what makes it
evil. I know of at least 2 places where its use is actually
*good* .
Let us hear :)
I imagine that Randy is in part alluding to the thread from
17th August 2003 with the subject "Alternative to eval",
which, because the application was for an Intranet, did not
find a better alternative.

Another possibility where eval seems to be required is the full
emulation of Function.prototype.apply for IE 4 and 5.0 (which
don't implement it):-

<URL:
http://groups.google.com/groups?selm...ws.demon.co.uk


A full emulation of function.prototype.apply may be required
if the curry function being discussed earlier this week was to
be used with the older IE/JScript versions.

Richard.
Jul 20 '05 #24
> Another possibility where eval seems to be required is the full
emulation of Function.prototype.apply for IE 4 and 5.0 (which
don't implement it):-


Function.prototype.apply = function (o, a) {
var r, x = '____apply';
o[x] = this;
switch ((a && a.length) || 0) {
case 0:
r = o[x]();
break;
case 1:
r = o[x](a[0]);
break;
case 2:
r = o[x](a[0], a[1]);
break;
case 3:
r = o[x](a[0], a[1], a[2]);
break;
case 4:
r = o[x](a[0], a[1], a[2], a[3]);
break;
case 5:
r = o[x](a[0], a[1], a[2], a[3], a[4]);
break;
case 6:
r = o[x](a[0], a[1], a[2], a[3], a[4], a[5]);
break;
default:
alarm('Time to add another case to apply.');
}
delete o[x];
return r;
};

The only thing I use eval for is converting JSON strings to objects.

http://www.JSON.org

Jul 20 '05 #25
"Douglas Crockford" <no****@laserlink.net> wrote in message
news:dc***************************@msgid.meganewss ervers.com...
... full emulation of Function.prototype.apply ...
<snip> default:
alarm('Time to add another case to apply.');
}
delete o[x];
return r;
};


Which is why I specifically said "full emulation". I freely admit (and
explained in the post I referenced) that in all "real world"
applications of apply a partial emulation, that does not require eval,
would be sufficient.

I mentioned the apply emulation in relation to the curry function(s)
from "Creating true copies (of objects) in JS (possible?)" because, if
that function is to be written to accept a theoretically unlimited
number of parameters it will need a full emulation of apply. On the
other hand, if it is accepted that in actual applications of that type
of function there will be a known upper limit to the number of
parameters needed, then the curry function does not need to use apply at
all.

Richard.
Jul 20 '05 #26
Albert Wagner wrote:
Thomas 'PointedEars' Lahn <Po*********@web.de> wrote:
Stuart wrote:
> why have you posted a somewhat
> pointless reply TWICE ??


I did not. Please get informed about control messages like Cancel.


Yes, you did. You should get informed when Cancel works and when it
doesn't.


Hm, either your news server does not obey Cancel (which is alas not yet
backed up by RFCs) or it could be a bug in Mozilla/5.0 rv:1.5 MailNews.
Unfortunately, I don't have access to control.cancel on my news server.

Could you please post the message ID of the dupe, so I can check that?
PointedEars

Jul 20 '05 #27
Thomas 'PointedEars' Lahn wrote:
Hm, either your news server does not obey Cancel (which is alas not yet
backed up by RFCs) or it could be a bug in Mozilla/5.0 rv:1.5 MailNews.
Unfortunately, I don't have access to control.cancel on my news server.

Could you please post the message ID of the dupe, so I can check that?


Not necessary. I've downloaded messages from another news server with
another newsreader and there was only one posting from me in this thread.
The Cancel worked and Mozilla is not buggy on that. If you see dupes either
your news server did not (yet) obey it or your newsreader does not provide
appropriate feedback.
HTH

PointedEars

Jul 20 '05 #28
hi************@aol.com (HikksNotAtHome) writes:
The first one, John Stocktons site has a textarea for input of
script to test it. When testing it, it seems to be the best way to
do it (using eval).

The other one was a problem I had a while back (it was discussed
here) where I had a select list that had fractions as its value.
I remember that :)
The fractions were random in the sense that they weren't always the
same denominator. The problem was trying to convert the fraction to
a decimal. It turned out that, in some browsers, eval performed at
the same level as splitting on the / and then dividing.
If it was only at the same level, then I wouldn't use eval. You need
total control of the arguments to eval (or a syntax check), which should
outweigh the advantage you get from shorter code.

As for speed. As far as I can see, eval is *much* slower (more tha 5x)
than using split in IE 6. A little faster yet is finding the "/" with
indexOf and using substring to get the parts:
var i = str.indexOf("/");
return str.substr(0,i)/str.substr(i+1);

In Opera 7.2, split was fastest and eval slowest. In MozFB, split and
eval are comparable. In Netscape 4.8, eval is actually twice as fast
as split, and 1.5 times as fast as using substring. It is generally
slower than the other browsers, though.
Where's the one place you use it?


A text area for input of scripts (actually the one that I link to in
this signature).

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
JS Test Bench: <URL:http://www.infimum.dk/HTML/javascript/jstest6.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #29
In article <bo**********@piggy.rz.tu-ilmenau.de>, Thomas 'PointedEars' Lahn
<Po*********@web.de> writes:
Not necessary. I've downloaded messages from another news server with
another newsreader and there was only one posting from me in this thread.
The Cancel worked and Mozilla is not buggy on that. If you see dupes either
your news server did not (yet) obey it or your newsreader does not provide
appropriate feedback.


Go to groups.google.com and look at the archive. http://tinyurl.com/tw51 and it
does indeed show the duplicate posts. Message 38 and 39 in the eval thread.

One should practice what they preach.
--
Randy
Jul 20 '05 #30
In article <he**********@hotpop.com>, Lasse Reichstein Nielsen <lr*@hotpop.com>
writes:
hi************@aol.com (HikksNotAtHome) writes:
The first one, John Stocktons site has a textarea for input of
script to test it. When testing it, it seems to be the best way to
do it (using eval).

The other one was a problem I had a while back (it was discussed
here) where I had a select list that had fractions as its value.
I remember that :)
The fractions were random in the sense that they weren't always the
same denominator. The problem was trying to convert the fraction to
a decimal. It turned out that, in some browsers, eval performed at
the same level as splitting on the / and then dividing.


If it was only at the same level, then I wouldn't use eval. You need
total control of the arguments to eval (or a syntax check), which should
outweigh the advantage you get from shorter code.


The tests that Richard and I did, eval actually outperformed split in IE6. In
the end, I used the split approach for two reasons. First was to try to teach
some inexperienced people another way to do it. Second was so that I wouldn't
have to listen to the same people rail me about "You do what you tell us not to
do".

The control of the arguments wasn't a problem. Whether using eval or the split
method, it would still need to be tested (which in my app it is) to ensure that
nothing got screwy and sent me bad data in the select lists so I don't see that
as a performance hit since I have to do it no matter what approach I use.
As for speed. As far as I can see, eval is *much* slower (more tha 5x)
than using split in IE 6. A little faster yet is finding the "/" with
indexOf and using substring to get the parts:
var i = str.indexOf("/");
return str.substr(0,i)/str.substr(i+1);

In Opera 7.2, split was fastest and eval slowest. In MozFB, split and
eval are comparable. In Netscape 4.8, eval is actually twice as fast
as split, and 1.5 times as fast as using substring. It is generally
slower than the other browsers, though.


The thread at http://tinyurl.com/tw7d shows some of the tests, and discussions,
about the speed impacts.
Where's the one place you use it?


A text area for input of scripts (actually the one that I link to in
this signature).


That is the use of it that I was referring to with John's site. Didn't know
yours had it as well (I very seldom follow signature URLs).
--
Randy
Jul 20 '05 #31
HikksNotAtHome wrote:
[...] Thomas 'PointedEars' Lahn <Po*********@web.de> writes:
Not necessary. I've downloaded messages from another news server with
another newsreader and there was only one posting from me in this thread.
The Cancel worked and Mozilla is not buggy on that. If you see dupes either
your news server did not (yet) obey it or your newsreader does not provide
appropriate feedback.


Go to groups.google.com and look at the archive. http://tinyurl.com/tw51 and it
does indeed show the duplicate posts. Message 38 and 39 in the eval thread.

One should practice what they preach.


It is widely known that Google Groups does not obey Cancel messages
(but I will remove it manually there, now that it has been archived),
and it seems the same goes for http://tinyurl.com/tw51 and other web
archives. You may try other *news* *servers*, like news.cis.dfn.de or
news.tu-ilmenau.de (I tested the latter) to see this confirmed.
HTH

PointedEars

P.S.
I would not have answered your posting if I had Internet connection
at home by now.

Jul 20 '05 #32
In article <bo*************@ID-107532.news.uni-berlin.de>, Thomas 'PointedEars'
Lahn <Po*********@web.de> writes:
Go to groups.google.com and look at the archive. http://tinyurl.com/tw51and it
does indeed show the duplicate posts. Message 38 and 39 in the eval thread.

One should practice what they preach.


It is widely known that Google Groups does not obey Cancel messages
(but I will remove it manually there, now that it has been archived),
and it seems the same goes for http://tinyurl.com/tw51 and other web
archives. You may try other *news* *servers*, like news.cis.dfn.de or
news.tu-ilmenau.de (I tested the latter) to see this confirmed.


It only takes one example of a service that doesn't obey the Cancel message to
show the fallacy of relying on it. The fact that so many people (including
myself) read the duplicate should indicate to you that it didn't work[1].
P.S.
I would not have answered your posting if I had Internet connection
at home by now.


What does "at home" and "not at home" have to do with answering a post?

[1] "work" in the sense that the message didn't get cancelled.
--
Randy
Jul 20 '05 #33
JRS: In article <20***************************@mb-m19.aol.com>, seen in
news:comp.lang.javascript, HikksNotAtHome <hi************@aol.com>
posted at Thu, 6 Nov 2003 14:21:51 :-
A text area for input of scripts (actually the one that I link to in
this signature).


That is the use of it that I was referring to with John's site. Didn't know
yours had it as well (I very seldom follow signature URLs).


Elsewhere on the site one can find instances of a somewhat different
usage.

Sometimes, where an input number is required, a user may wish to supply
an expression; for example, if a distance in kilometres is required, it
may be convenient to supply "<miles>*1.609. I would only do this on a
technical page, such as astro.htm; it would not be appropriate for
others.

--
© John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v4.00 MIME. ©
Web <URL:http://www.merlyn.demon.co.uk/> - FAQqish topics, acronyms & links;
some Astro stuff via astro.htm, gravity0.htm; quotes.htm; pascal.htm; &c, &c.
No Encoding. Quotes before replies. Snip well. Write clearly. Don't Mail News.
Jul 20 '05 #34

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Reply Via Newsgroup | last post by:
This might sound sad... someone requesting a disertation on the 'eval' statement... but... I've been reading someone else's post - they had a huge calander like script and a handful of folk cursed...
11
by: sneill | last post by:
I have read a number of posts on the use of eval() in Javascript, and I agree that its use is questionable. But it does beg the following question: "How arbitrary does a string need to be before...
0
by: Michelle Keys | last post by:
Subject: DataBinder.Eval Error! Server Error in '/MSPOS' Application. ------------------------------------------------------------------------ -------- DataBinder.Eval:...
18
by: Joe Fallon | last post by:
I have some complex logic which is fairly simply to build up into a string. I needed a way to Eval this string and return a Boolean result. This code works fine to achieve that goal. My...
15
by: manstey | last post by:
Hi, I have a text file called a.txt: # comments I read it using this:
3
by: Pauljh | last post by:
Hi All, I'm running some javascript over a server side generated web page and have multiple generated empty select statements, that I want to populate when the page is loaded. As HTML doesn't do...
4
by: Jm lists | last post by:
Hello members, I want to know does the "eval" in python have the same features as in Perl (capture errors)? For example,in perl I can wrote: $re = eval { 1 / 0 }; Though 1/0 is a fatal...
6
by: RandomElle | last post by:
Hi there I'm hoping someone can help me out with the use of the Eval function. I am using Access2003 under WinXP Pro. I can successfully use the Eval function and get it to call any function with...
5
by: wendallsan | last post by:
Hi all, I'm running into a situation where it seems that JS stops executing as soon as I call an eval in my script. I have an Ajax.Request call to a PHP page that builds a JS object and returns...
10
by: Gordon | last post by:
I have a script that creates new objects based on the value of a form field. Basically, the code looks like this. eval ('new ' + objType.value + '(val1, val2, val3'); objType is a select with...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.