Pop up with strange behaviour in Internet Explorer but not Firefox.

Discussion in 'Javascript' started by ft310, May 29, 2007.

  1. ft310

    ft310 Guest

    Use Internet Explorer go to http://rhodeisland-aa.org/tester/meetings/index.htm

    On the left click "and go to meetings"

    Click any address in the right hand 'location' column.

    The entire page reloads in the frame. (Bad)

    Perform the same test using Firefox

    The entire page does not reload. (Good)

    In both cases the disclaimer window appears and the application
    continues. That is good, but the IE behaviour is not good.

    I know I am doing something wrong -- please tell me.

    Thank you.
     
    ft310, May 29, 2007
    #1
    1. Advertisements

  2. I'm using FF2 and the entire page does reload too.
     
    noagbodjivictor, May 30, 2007
    #2
    1. Advertisements

  3. Pay no attention to what I wrote earlier. You are right.
     
    noagbodjivictor, May 30, 2007
    #3
  4. Ok. This is what you have to do. Put something in the href="";
    otherwhise, IE will fill it for you to http://rhodeisland-aa.org/tester/meetings/,
    which will cause the entire page to reload.

    But. It seems like FF is replacing it with the current URL in the
    address bar.

    Put something like href="#".
     
    noagbodjivictor, May 30, 2007
    #4
  5. ft310

    Lee Guest

    said:
    More important is that the onclick handler return false, so the
    browser doesn't try to follow the link.

    <a href="#NoLuckIfScriptDisabled"
    onclick="launch(610);return false">Sturdy Hospital Auditorium, 211 Park Street
    02703</a>


    --
     
    Lee, May 30, 2007
    #5
  6. ft310

    ft310 Guest

    Thank you - this is great.

    Are you using some debugger to get this or is it just a superior
    development of your craft?


    Thanks

    Frank Toohey
     
    ft310, May 30, 2007
    #6
  7. ft310

    ft310 Guest

    Randy Again thanks -- love your answer -- it you got it . . .

    The hint about the return will be implemented immediately.
     
    ft310, May 30, 2007
    #7
  8. ft310

    -Lost Guest

    Could you perhaps provide a search string to that effect?

    I tried "return functionName" just in case, and well, it was not
    satisfactory to say the least.

    I am quite happy to know that I already subscribed to this method of
    coding though. Why it is necessarily better I do not know. I did it
    because it just made sense to reduce clutter in your markup and two,
    because, why not have the function do it for you?
     
    -Lost, May 30, 2007
    #8
  9. ft310

    -Lost Guest

    Firstly, sorry for the *extremely* delayed response. I forgot the name
    of the thread and had a bit of a family issue so didn't check the groups
    for several days.

    Little did I know that so many new replies would appear and make me lose
    my place.

    I eventually searched for "return functionName." ;)

    Anyway, in response, because I developed what I thought was a clear
    understanding of better coding practices.

    Ah, I never thought (or knew) about that.

    Ah, OK. So by not firing the default link *and* your function does
    nothing you realize it was the function itself that went afoul.

    Never thought about that either.
    Oooo. Internet Explorer-only functions huh? Tsk tsk tsk.

    Also, you did mean window.ActiveXObject right? Otherwise, I am lost.
    (Get it, I am lost? Ha!)

    Speaking of proper coding practices, which is better?:

    function f1()
    {
    if (window.ActiveXObject)
    {
    // do ActiveX
    return false; // don't follow link
    }
    return true;
    }

    function f2()
    {
    if (window.ActiveXObject)
    {
    // do ActiveX
    return false; // don't follow link
    }
    else
    {
    return true;
    }
    }

    I certainly like f1() better.
    Would Mr. Webb like some of -Lost's Seroquel? I have 300mg tablets.
    Unless you are my size, that will put you to sleep for nigh on 16 hours.
     
    -Lost, Jun 5, 2007
    #9
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.