validator not working when page is served from a different machine

Discussion in 'ASP .Net' started by Don, Aug 30, 2005.

  1. Don

    Don Guest

    I have a page with a required field validator and it is working fine.
    We put this project on another developer's machine and the validators
    do not work. We get a javascript error that says 'Invalid Character
    at line 24' but that line is not even javaScript.

    This project is in sourceSafe and we both have done 'get latest
    version' so I know the code is the same. This is not a browser
    config issue because if I browse to his machine the valdiator does not
    work and if he browses to my machine they do work.

    I've noticed that the onsubmit property of the form tag is different
    when my machine serves then page than it is when the page is served by
    his machine. Below are the onsubmit properties:

    Good onsubmit:
    "if (!ValidatorOnSubmit()) return false;"

    Bad onsubmit:
    "ValidatorOnSubmit();"

    Why would the same code generate different HTML?

    Don
     
    Don, Aug 30, 2005
    #1
    1. Advertising

  2. Don

    Andrea Zani Guest

    Don <> ha scritto:
    > I have a page with a required field validator and it is working fine.
    > We put this project on another developer's machine and the validators
    > do not work. We get a javascript error that says 'Invalid Character
    > at line 24' but that line is not even javaScript.


    If machina is Win 2003, install Framework Service Pack 1 for win 2003.

    --
    AZ [Microsoft - .NET MVP]
    Mia Home page: http://ciclismo.sitiasp.it
    Asp.Net community: http://www.aspitalia.com
    Il mio blog: http://blogs.aspitalia.com/az
     
    Andrea Zani, Aug 30, 2005
    #2
    1. Advertising

  3. Don

    Don Guest

    The machine is XP. I see that I have a hotfix (KB886904) and the other
    machine does not. I'm going to try to find this hotfix and install it
    on the other machine. Is the service pack 1?
     
    Don, Aug 30, 2005
    #3
  4. Don

    WJ Guest

    I have a problem that is not very similar to yours but is close. Here goes:
    my PC is Windows xp pro.sp2. IE6.x (lattest), pn certain websites such as
    http://dictionary.com, when I enter a word that it does not know, a message
    says:

    <<<
    A Runtime error has occurred. Do you wish to debug ?
    Line: 1
    Error: Syntax error
    >>>


    But then I went to other PC and attempted the samething, it works fine. So I
    rebuilt by PC, it ran for a while and the same thing happenned again ! Very
    weird!

    *** I then tried to view the source code of the page, sometimes I could view
    it in NotePad, othertimes (on the same website), the "view source" menu itm
    is grayed out. When I could view the source, I saw nothing wrong with Line 1
    and or I donot know where "Line: 1" is to begin with. Windows does have its
    own mind ! I quit debugging it.

    John
     
    WJ, Aug 30, 2005
    #4
  5. Don

    John Rivers Guest

    this is the sort of problem

    that is likely to arise when

    using a badly designed platform

    such as asp.net's htmlcontrols, usercontrols, servercontrols

    if you continue to use these controls

    your job will contain many unhappy hours of debugging and

    reverse engineering, just to achieve a lesser result

    my recommendation is to avoid them and implement such
    features yourself

    you will gain:

    - predictability
    - save time learning arbitrary technology with doubtful value
    - ability to fix your code (you can't rewrite broken microsoft stuff,
    you have to wait for them to fix it)
    - protection from future "updates" that break your apps

    would you trust a third party component to generate javascript on the
    fly?

    of course not! so why trust these controls?

    top end websites do not use *these features* of asp.net - they just use
    the good bits

    the fact that you need to install a hotfix proves my point perfectly -
    ms first attempt was
    flawed - hardly surprising they have bitten off more than they can
    chew!
     
    John Rivers, Aug 31, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Curt_C [MVP]
    Replies:
    0
    Views:
    2,056
    Curt_C [MVP]
    Sep 15, 2004
  2. GrantMagic
    Replies:
    0
    Views:
    6,725
    GrantMagic
    Sep 15, 2004
  3. =?Utf-8?B?TmVhbA==?=

    "This type of page is not served."

    =?Utf-8?B?TmVhbA==?=, Oct 14, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    387
    =?Utf-8?B?TmVhbA==?=
    Oct 14, 2004
  4. DotNetJunkies User

    "This type of page is not served."

    DotNetJunkies User, Oct 14, 2004, in forum: ASP .Net
    Replies:
    3
    Views:
    7,285
    Scott M.
    Oct 15, 2004
  5. robmanger
    Replies:
    4
    Views:
    634
    Scott Allen
    May 4, 2005
Loading...

Share This Page