Safari is sucking the life out of me

    Date: 04/06/05 (Asp Dot Net)    Keywords: browser, asp, java, web

    I'm having a problem that I hope someone may be able to help with.
    I have some .NET and Javascript code that works in IE, NN, Moz, and Opera BUT it is not working in Safari.


    I have a webform called Input.aspx

    The Input.aspx.vb page in Page_Load has these two lines:
    btnSubmit.Attributes.Add("onClick", "javascript: return Validate(event, this);")
    GetPostBackEventReference(Page)

    The Input.aspx page has a button btnSubmit and some Javascript
    In the javascript I am using a flag called "problem"
    When problem is true I return false from the event which stops the further propagation of the btnSubmit's click.
    When problem is false I
    a. hide a span that encloses btnSubmit
    b. show a span that says, "Processing...Please Wait"
    c. return true

    This works in IE, NN, Mozilla, and Opera.
    The problem is Safari.
    In Safari, it performs a, b, and c, but the btnSubmit Server Side Click event doesn't happen.

    So, I thought, okay I'll just call __doPostBack right after step b. The problem with that is that the Server Side Click happens twice then in IE, NN, etc.

    I can't figure out what the hell Safari is doing (or not doing, really) with the __doPostBack?

    Here is the Javascript in Input.aspx
    //some validating stuff
    //assume that at this point problem is either "true" or "false"
    function Validate(e,r)
    {
    if (problem == "true") // problem, cancel event
    {
    return false;
    e.returnValue = false;
    }
    else // no problem, continue
    {
    // hide button, show processing gif, continue postback
    lbutton.style.display = "none";
    lprocessing.style.display = "inline";
    return true;
    e.returnValue = true;
    }
    }


    All browsers (including Safari) are performing Validate upon btnSubmit onClick event.
    All browsers except Safari are continuing on with the Server Side Click event of btnSubmit after returning from the function Validate().

    Any ideas why Safari just stops?

    Source: http://www.livejournal.com/community/aspdotnet/31454.html

« Server Error in... || user controls... »


antivirus | apache | asp | blogging | browser | bugtracking | cms | crm | css | database | ebay | ecommerce | google | hosting | html | java | jsp | linux | microsoft | mysql | offshore | offshoring | oscommerce | php | postgresql | programming | rss | security | seo | shopping | software | spam | spyware | sql | technology | templates | tracker | virus | web | xml | yahoo | home