Konqueror / JavaScript - KDE

This is a discussion on Konqueror / JavaScript - KDE ; Hello, In one of my web apps, I use two JavaScript functions to, after clicking a button ( name="myName"/>), 1. initiate a (https) request (done in myFirstFunction) and then 2. tell a div containing the button to hide itself (by ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Konqueror / JavaScript

  1. Konqueror / JavaScript

    Hello,

    In one of my web apps, I use two JavaScript functions to, after clicking a
    button ( name="myName"/>),

    1. initiate a (https) request (done in myFirstFunction) and then
    2. tell a div containing the button to hide itself (by calling
    document.getElementById('myDivId').style.display = 'none'; in mySecondFunction).

    It works in "all possible" OS/Browser combinations, except Konqueror, where I
    experience some strange behaviour: after a click, a KDE logo in the top right
    corner starts spinning, indicating that someting (a request?) is underway. The
    browser becomes irresponsive. As if JavaScript interpreter went into some loop
    it can't get out of. It only stops when I press the red x in Konqueror's toolbar.

    Now, if I add an alert("blahblahblah"); in either of my functions, the request
    completes normaly (the browser is normally responsive).

    Does anybody have any idea what could be causing such a behaviour?

    BTW: I use an up-to-date Kubuntu Edgy (KDE 3.5.5) running in VMware Player 1.0.2
    on Windows XP SP2.

    Thanks in advance,
    D.

  2. Re: Konqueror / JavaScript

    David V. wrote:
    > Hello,
    >
    > In one of my web apps, I use two JavaScript functions to, after clicking
    > a button ( > onclick="myFirstFunction();mySecondFunction();" name="myName"/>),
    >
    > 1. initiate a (https) request (done in myFirstFunction) and then
    > 2. tell a div containing the button to hide itself (by calling
    > document.getElementById('myDivId').style.display = 'none'; in
    > mySecondFunction).
    >
    > It works in "all possible" OS/Browser combinations, except Konqueror,
    > where I experience some strange behaviour: after a click, a KDE logo in
    > the top right corner starts spinning, indicating that someting (a
    > request?) is underway.


    Thats the default functionality of a button press,that a request is
    done, if you don't want this effect, you need to return false.

    onClick="....; return false;"


    Keep in mind that what msie does isn't by "standard", microsoft has put
    a lot of energy to break things.


    > BTW: I use an up-to-date Kubuntu Edgy (KDE 3.5.5) running in VMware
    > Player 1.0.2 on Windows XP SP2.


    Most sensible people do the other way around
    --

    //Aho

  3. Re: Konqueror / JavaScript

    J.O. Aho wrote:
    > David V. wrote:
    >> Hello,
    >>
    >> In one of my web apps, I use two JavaScript functions to, after clicking
    >> a button ( >> onclick="myFirstFunction();mySecondFunction();" name="myName"/>),
    >>
    >> 1. initiate a (https) request (done in myFirstFunction) and then
    >> 2. tell a div containing the button to hide itself (by calling
    >> document.getElementById('myDivId').style.display = 'none'; in
    >> mySecondFunction).
    >>
    >> It works in "all possible" OS/Browser combinations, except Konqueror,
    >> where I experience some strange behaviour: after a click, a KDE logo in
    >> the top right corner starts spinning, indicating that someting (a
    >> request?) is underway.

    >
    > Thats the default functionality of a button press,that a request is
    > done, if you don't want this effect, you need to return false.
    >
    > onClick="....; return false;"


    Oh, man, could it be that simple? Why didn't I think of that? I was getting
    ready to start believeing in miracles.

    Thanks for the tip. I hope it works.

    > Keep in mind that what msie does isn't by "standard", microsoft has put
    > a lot of energy to break things.


    I know, I know. But I keep forgetting, I guess.

    >> BTW: I use an up-to-date Kubuntu Edgy (KDE 3.5.5) running in VMware
    >> Player 1.0.2 on Windows XP SP2.

    >
    > Most sensible people do the other way around


    I'm at work. They _make_ me use Windows. :-(
    We test our app on other OS/Browser combinations through VMs.

  4. Re: Konqueror / JavaScript

    David V. wrote:
    > J.O. Aho wrote:
    >> David V. wrote:
    >>> Hello,
    >>>
    >>> In one of my web apps, I use two JavaScript functions to, after clicking
    >>> a button ( >>> onclick="myFirstFunction();mySecondFunction();" name="myName"/>),
    >>>
    >>> 1. initiate a (https) request (done in myFirstFunction) and then
    >>> 2. tell a div containing the button to hide itself (by calling
    >>> document.getElementById('myDivId').style.display = 'none'; in
    >>> mySecondFunction).
    >>>
    >>> It works in "all possible" OS/Browser combinations, except Konqueror,
    >>> where I experience some strange behaviour: after a click, a KDE logo in
    >>> the top right corner starts spinning, indicating that someting (a
    >>> request?) is underway.

    >>
    >> Thats the default functionality of a button press,that a request is
    >> done, if you don't want this effect, you need to return false.
    >>
    >> onClick="....; return false;"

    >
    > Oh, man, could it be that simple? Why didn't I think of that? I was
    > getting ready to start believeing in miracles.
    >
    > Thanks for the tip. I hope it works.


    I put "return true;"s all over the place (both functions and onclick) but it
    didn't work.

    Then I figured that all that alert("whatever"); did was to delay execution for
    some time and I wrapped the first function with setTimeout(). So, after a click
    on the button application stays responsive, but the request, like before,
    doesn't get sent. Oh well, at least I have the responsiveness.

+ Reply to Thread