WebUIValidation.js

Discussion in 'ASP .Net' started by Morten, May 24, 2004.

  1. Morten

    Morten Guest

    Hi!

    I've developed an application that uses forms based authentication. The
    logon page uses the file WebUIValidation.js a couple of places and the file
    is located in the right place on the server. I have a user who uses a Linux
    browser which gives the following error when he tries to log in:

    http://server/aspnet_client/system_web/1_1_4322/WebUIValidation.js:
    SyntaxError: Parse error at line 342

    It works without errors in IE6. Does anybody have any idea if this is
    something that I can fix somehow?

    Best regards

    Morten
    Morten, May 24, 2004
    #1
    1. Advertising

  2. "Morten" <> wrote in
    news:#:

    > Hi!
    >
    > I've developed an application that uses forms based
    > authentication. The logon page uses the file WebUIValidation.js
    > a couple of places and the file is located in the right place on
    > the server. I have a user who uses a Linux browser which gives
    > the following error when he tries to log in:
    >
    > http://server/aspnet_client/system_web/1_1_4322/WebUIValidation.j
    > s: SyntaxError: Parse error at line 342
    >
    > It works without errors in IE6. Does anybody have any idea if
    > this is something that I can fix somehow?


    Morten,

    Not sure why the Linux browser is choking on that code...

    A simple but drastic fix would be to turn off client-side validation
    for all of the validators on the page (set EnableClientScript to
    false).

    Another way would be to conditionally turn client-side validation on
    or off depending on which browser requested the page:

    // Untested code.
    private void Page_Load(object sender, System.EventArgs e)
    {
    bool canBrowserHandleValidation =
    (this.Request.Browser.Type.ToUpper() == "IE6");

    foreach (Control ctrl in this.Controls)
    {
    if (ctrl is BaseValidator)
    ((BaseValidator) ctrl).EnableClientScript =
    canBrowserHandleValidation;
    }
    }


    --
    Hope this helps.

    Chris.
    -------------
    C.R. Timmons Consulting, Inc.
    http://www.crtimmonsinc.com/
    Chris R. Timmons, May 24, 2004
    #2
    1. Advertising

  3. Morten

    bruce barker Guest

    WebUIValidation.js uses proprietary IE methods and will choke any other
    browser, for this reason .net usually suppresses client validation for any
    browser other than IE. for some reason, the .net browser detect code thinks
    the linux browser is IE, you need to update your browsercaps file.

    -- bruce (sqlwork.com)



    "Morten" <> wrote in message
    news:#...
    > Hi!
    >
    > I've developed an application that uses forms based authentication. The
    > logon page uses the file WebUIValidation.js a couple of places and the

    file
    > is located in the right place on the server. I have a user who uses a

    Linux
    > browser which gives the following error when he tries to log in:
    >
    > http://server/aspnet_client/system_web/1_1_4322/WebUIValidation.js:
    > SyntaxError: Parse error at line 342
    >
    > It works without errors in IE6. Does anybody have any idea if this is
    > something that I can fix somehow?
    >
    > Best regards
    >
    > Morten
    >
    >
    bruce barker, May 24, 2004
    #3
    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. Kevin Blakeley

    Can't find WebUIValidation.js

    Kevin Blakeley, Jun 27, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    480
    Chance Hopkins
    Jun 28, 2003
  2. Art Thomas
    Replies:
    3
    Views:
    581
    Art Thomas
    Jul 26, 2003
  3. Art Kedroski
    Replies:
    0
    Views:
    354
    Art Kedroski
    Jul 26, 2003
  4. Adam Carpenter
    Replies:
    1
    Views:
    870
    James J. Foster
    Aug 13, 2003
  5. SStory
    Replies:
    2
    Views:
    347
    SStory
    Oct 16, 2003
Loading...

Share This Page