Well, for one thing, you ARE copying/pasting, so, is not that the code
doesn't work, it works, it just that you didn't write it, you're not the
author and on that, we cannot query you on anything on the code issues or
what it's there to do, now, we, for any querying or addressing on it need
the author of it, no the fella doing the copy/pasting, Javascript is Cish,
so, if you do in fact know C, shouldn't be an issue, PHP is a bit Perlish
and so is Javascript, so, if you do in fact know PHP that well, you can
tell pretty much what js is doing.
I've seen those copy/pasted deals, usually is, the fella copy/paste a
few <script> blocks in a page, and each block has their own locals vars
per function and/or their own globals, all locals fall within the
container scope, usually a function, but depending on the runtime it can
collide with another variable on another function with the same name or
branching or addressing the same object over the same runtime over a
recursion or some event listener, but what I've seen often is, global
naming issues, each <script> block define some globals and all globals
fall withing the SAME scope, so, one block defined global, maybe redefined
or reassigned on another. Then again, you're not the author of it. You'd
get the same in any language if you plaster around without auditing from a
file to another.
Danny
On Sun, 26 Jun 2005 10:14:21 -0700, Fabian <newspost@hotmail.com> wrote:
[color=blue]
> Well, what can I say...I really hate Javascript.
>
> I am not programming as profession but I sometimes work with PHP with
> MySQL, ASP with Ms Access/SQL Server. I have done something in VB and
> when I was jounger I worked with C.
>
> But what happens with Javascript, it happens with no other language.
>
> I work with WinXP SP2 & IIS5, now. But also with Win2k and win98, as
> fas as I remember, it was the same. I always keep my PC updated with
> Microsoft updates.
>
> If I need to work with Javascript (I try to avoid it, but when it is
> necessary...), I normally copy some files from the Internet for not
> having to reinvent the wheel myself. Take this script, for example, a
> typical form verifier:
>
http://willmaster.com/possibilities/...edFieldsCheck/
>
> but could also be another script, it makes no difference for what
> happens.
>
> I try it online and it works, I download the file to my hard disk. Ok,
> it works. I copy the script to my file and it does NOT work at all. Ok,
> I might have made a mistake...no way to understand what....
> I do not attach here my file because my file is not the problem.
>
> I run again the file downloaded from the internet and...it does not
> work any longer !!!! It gives an error message...why if it was working
> before and I have not edited it?!?
> The error message is not important: it is one of those IE's yellow
> triangle alert that refer to unexisting row and column. And you never
> understand what's about.
>
> I reboot the PC and same story. The original file downloaded works, my
> files does not work (wihout any error message in my case) and the
> orginal downloaded file does not work any longer after that!!!!
>
> What the hell happens with javascript? Does it hangs the IIS service?
> Does the function get stuck in the cache?
>
> How can I avoid this to happen. How can I debug my scripts as I do for
> all the others scrips/languages: without rebooting at the first error
> message?
>
> It's really disappointing: yesterday I managed to set up a webform +
> page results in ASP + MS Access in a few hours and today I am stuck all
> day with a stupid form verifier in Javascript.
>
> Thanks for your ideas and suggestions.
>
> Fabian
>[/color]
--
Using Opera's revolutionary e-mail client:
http://www.opera.com/mail/