BIG form = buggy?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chunk1978
    New Member
    • Jan 2007
    • 224

    BIG form = buggy?

    hello... i would like to know if large codes contribute to bugs? i mean, my form works great, but SOMETIMES after an alert it doesn't focus on the respective field... and one time i was testing my form over on a friend's PC and for no reason one of the form text fields was completely disabled (there is no disabling/enabling function concerning that field)...

    my javascript/html code is just short of 3000 lines long, and the .HTML file is about 130kb... i spent MONTHS on this, so i hope i didn't dig myself into a hole by making my form too big...

    anyone have any ideas?
  • chunk1978
    New Member
    • Jan 2007
    • 224

    #2
    humm... i guess this was a really dumb question since no one replied... perhaps i missed something with JS basics, like "don't write a form bigger than 1000 lines of code or the script becomes unstable..."???

    Comment

    • iam_clint
      Recognized Expert Top Contributor
      • Jul 2006
      • 1207

      #3
      I haven't seen problems and I have wrote some pretty large scripts and forms.

      maybe its your code that is buggy?

      Comment

      • chunk1978
        New Member
        • Jan 2007
        • 224

        #4
        i would assume it's buggy, but could it actually be classified as being buggy is it only doesn't work sometimes... like, most of the time it works fine, and when it doesn't work it's always the .focus() part of functions... i still have no idea why one of the text areas was disabled that one time, as it never happened again...it's really strange.

        Comment

        • iam_clint
          Recognized Expert Top Contributor
          • Jul 2006
          • 1207

          #5
          possible post your script here and we can take a look at it.

          Comment

          • chunk1978
            New Member
            • Jan 2007
            • 224

            #6
            Originally posted by iam_clint
            possible post your script here and we can take a look at it.
            i'm not so sure it's a good idea to post 2500+ lines of javascript here... plus, i think it's fine... and perhaps it's not such a big deal if the focus doesn't work for some users, it's not really important, as the alert message always works...

            i just though maybe the javascript "engine" (?) or whatever could be unstable with large scripts...

            i guess when i publish it to the web i could give you the address and if you wanted to take a look at it and give me some suggestions to tighten up the code that would be great... but that''s not for a while yet.

            Comment

            • iam_clint
              Recognized Expert Top Contributor
              • Jul 2006
              • 1207

              #7
              Sure come back and post your site..



              I would really like to know what you need such a large javascript to do! :P

              Comment

              • dmjpro
                Top Contributor
                • Jan 2007
                • 2476

                #8
                i am using ie 4 i also wrote js which is 4000 and 5000 lines in my project ..
                but they are still working .....
                ur problem i faced....
                to remove this problem i user .focus() after the alert()....
                is it true...to have bugs on increasing the the code length in js
                thanksss....... ....

                Comment

                • nmadct
                  Recognized Expert New Member
                  • Jan 2007
                  • 83

                  #9
                  Originally posted by chunk1978
                  humm... i guess this was a really dumb question since no one replied... perhaps i missed something with JS basics, like "don't write a form bigger than 1000 lines of code or the script becomes unstable..."???
                  While there's no particular limit for any javascript implementation that I know of, it's a truism in programming that the bigger and more complex your code is, the more likely it is to have bugs, and the harder it will become to find and fix bugs. That's just a fact of life.

                  Comment

                  Working...