Getting the validation summary message to display: help...

Discussion in 'ASP .Net' started by JJ_377@hotmail.com, Aug 24, 2005.

  1. Guest

    This works in Internet Explorer, but not in Netscape (8).
    Note this script was borrowed from another posting.
    Can anyone help? Thank you.

    function ErrorMessage()
    {
    try
    {
    var validationSummaryMessage =
    document.getElementById("vs_Summary").innerText;


    if( validationSummaryMessage != null &&
    validationSummaryMessage !=
    "")
    {
    alert(validationSummaryMessage­);
    }
    }
    catch(exception)
    {
    }



    }
    , Aug 24, 2005
    #1
    1. Advertising

  2. i have a feeling the line you need to review is
    document.getElementById("vs_Summary").innerText;

    JavaScript differs slightly over all browser, and you might need to do a
    check to see which type of client browser it is and modify your code
    slightly.

    I know a method to see if its a mozilla based brower versus IE

    if(document.all)
    {
    //IE BROWSER
    }
    else
    {
    //MOZILLA BROWSER
    }

    So, google and find out the Netscape equivalent of:
    document.getElementById("vs_Summary").innerText;
    and the method to check for Netscape as well.

    It will be worth it to make a page with just that line, and test it to see
    if it works in netscape, and try modify it to get it too work.
    I would try, but don't have netscape (and AM NOT INSTALLING IT :) )

    HTH and Good Luck


    <> wrote in message
    news:...
    This works in Internet Explorer, but not in Netscape (8).
    Note this script was borrowed from another posting.
    Can anyone help? Thank you.

    function ErrorMessage()
    {
    try
    {
    var validationSummaryMessage =
    document.getElementById("vs_Summary").innerText;


    if( validationSummaryMessage != null &&
    validationSummaryMessage !=
    "")
    {
    alert(validationSummaryMessage­);
    }
    }
    catch(exception)
    {
    }



    }
    Grant Merwitz, Aug 24, 2005
    #2
    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. Libs
    Replies:
    0
    Views:
    1,482
  2. =?Utf-8?B?TWlrZSBNb29yZQ==?=

    Validation Summary Message Box Not Displaying

    =?Utf-8?B?TWlrZSBNb29yZQ==?=, Dec 7, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    4,935
    Patrick Olurotimi Ige
    Dec 9, 2004
  3. Dan Sikorsky
    Replies:
    4
    Views:
    4,567
  4. TS

    validation summary not always showing message box

    TS, Dec 2, 2005, in forum: ASP .Net Web Controls
    Replies:
    4
    Views:
    553
    Steven Cheng[MSFT]
    Dec 6, 2005
  5. TS
    Replies:
    5
    Views:
    267
Loading...

Share This Page