Find the answer to your Linux question:
Results 1 to 2 of 2
Several of the JS /AJAX functions on my website http://invhost.com/ used to work in Galeon but now they do not. What, for example, is wrong with this code? if (confirm('{L_?CONFIRM_DELETE|THESE_THINGS=THIS_POS ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2006
    Location
    Torquay, England
    Posts
    22

    Galeon is annoying me


    Several of the JS/AJAX functions on my website http://invhost.com/ used to work in Galeon but now they do not.

    What, for example, is wrong with this code?

    if (confirm('{L_?CONFIRM_DELETE|THESE_THINGS=THIS_POS T}')) AJAX('p'+post,'post.php?mode=delete&p='+post,true) ;

    The stuff in {} is parsed by PHP before the page is loaded.

    Without the if confirm there, it works fine. With the if confirm there, it displays the confirm box and then does nothing regardless of which button you click. The code works fine in Konqueror and Opera.

    Similarly is this code:

    var n = prompt('{L_?NUMBER_FILES}','1');
    if (!n) return;

    Regardless of what you enter in the prompt box, and regardless of whether you click OK or Cancel, nothing happens after the box is displayed. Again, it works fine in Konqueror and Opera.

    I'm pretty sure that Galeon is just stopping execution of JS after displaying a dialog box, but I could be wrong. The exact same happens in Firefox.

  2. #2
    Just Joined!
    Join Date
    Dec 2006
    Location
    Torquay, England
    Posts
    22
    I managed to solve the problem by removing this code elsewhere on the page:

    document.captureEvents(Event.MOUSEMOVE);
    document.onmousemove = getMouseXY;

    when the browser is detected as Gecko.

    But this means I can't use events on the same page as alert/confirm/prompt boxes! How stupid is this? Surely it should be fixed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •