Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 10 of 10
  1. #1
    New to the CF scene
    Join Date
    May 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Script not working in IE

    Hello,

    This script works great in Firefox, and Chrome, but does not work in IE as soon as I put <!DOCTYPE html>. It's suppose to pop open a login window.

    This is the part that is in the html code:

    Code:
    <script>
    var g_loginWindow = null;
    
    function login()
    {
      new Ajax.Request( 'login.php', {
        parameters: $('loginfrm').serialize(),
        method: 'post',
        onSuccess: function( transport ) {
           g_loginWindow.close();
        }
      } );
    }
    
    function showWindow()
    {
      g_loginWindow = new Window( { className: 'spread', title: "Member Login",
        destroyOnClose: true,
        onClose:function() { $('myloginform').style.display = 'none'; } } ); 
      g_loginWindow.setContent( 'myloginform', true, true );
      g_loginWindow.showCenter();
    }
    </script>

    There is also 3 other js scripts it calls on, but im hoping it's part of this.

    Any help is appreciated.
    Last edited by alfromsd; 05-29-2012 at 05:40 PM.

  • #2
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,389
    Thanks
    13
    Thanked 353 Times in 349 Posts
    what error message do you get in IE?
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  • #3
    New to the CF scene
    Join Date
    May 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    None, when i click the link which is suppose to open the pop up form, nothing happens at all. When i take out <!DOCTYPE html> on top of the html page, it works but then the web site looks like crap with things not aligned right.

  • #4
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,389
    Thanks
    13
    Thanked 353 Times in 349 Posts
    and what do yu get when you press F12?
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  • #5
    New to the CF scene
    Join Date
    May 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Nothing pertaining to this script that i can see.

    Here is a link of what it is suppose to do:
    http://www.textvending.com/login/form.php

    Here is a link on a sample page where it does not work:
    http://www.textvending.com/form.php

    The link is the login on the bottom left, or the "members login" on the top right.

    Also if i change compatibility view, it does work, but I would like it to just work normally. I'm running IE 9. For some reason it does work on older IE browsers.

  • #6
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,389
    Thanks
    13
    Thanked 353 Times in 349 Posts
    I can’t help very much as I’m on UNIX here (no IE available) … sorry
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  • #7
    New to the CF scene
    Join Date
    May 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Dormilich View Post
    I can’t help very much as I’m on UNIX here (no IE available) … sorry
    I have read some posts where it has something to do with changing the scripts document type, but the 3 other scripts are pretty complex, and I cant figure out where or what to change.

    Any suggestions? Can you see the other scripts now since I put a link up?

  • #8
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,389
    Thanks
    13
    Thanked 353 Times in 349 Posts
    the problem is, that it is a problem with IE. so all browsers I could use to debug won’t help as the scripts work there. and I most probably wouldn’t find anything (in 3 complex scripts (!) ) without any kind of hint, which is primarily the JS error message.

    I can confirm that IE can dramatically change its behaviour if in standard or quirks mode, but that’s pretty much all I can say blindfolded.
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer

  • #9
    New to the CF scene
    Join Date
    May 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by Dormilich View Post
    the problem is, that it is a problem with IE. so all browsers I could use to debug won’t help as the scripts work there. and I most probably wouldn’t find anything (in 3 complex scripts (!) ) without any kind of hint, which is primarily the JS error message.

    I can confirm that IE can dramatically change its behaviour if in standard or quirks mode, but that’s pretty much all I can say blindfolded.
    Been working on this for the last 3 days, I just now figured out it has to do with the <!doc.type html>.. been really frustrating, but thanks for looking I really appreciate it.

  • #10
    New to the CF scene
    Join Date
    May 2012
    Posts
    8
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Finally figured it out...

    I put in the header:
    Code:
    <meta http-equiv="X-UA-Compatible" content="IE=8;FF=3;OtherUA=4" />
    So stupid that IE9 has so many problems that i have to force it to version 8.


  •  

    Posting Permissions

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