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 8 of 8
  1. #1
    Regular Coder
    Join Date
    Aug 2005
    Location
    Canada
    Posts
    137
    Thanks
    2
    Thanked 0 Times in 0 Posts

    AJAX Not Working in IE (6 or 7)

    If you goto http://noveis.net/bashs/apply.php#ship in Firefox or Opera, and select something (other then any) from the drop down menu next to 'Desired ship class:'
    In a box to the right AJAX should load a page with some text.
    It works in Firefox and Opera, but not in Internet Explorer 6 or 7.

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    I went there in IE7 and got 5-7 error messages saying expected ")"

    Eric
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    Regular Coder
    Join Date
    Aug 2005
    Location
    Canada
    Posts
    137
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by A1ien51 View Post
    I went there in IE7 and got 5-7 error messages saying expected ")"

    Eric
    How do you see error messages in IE?

  • #4
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,151
    Thanks
    2
    Thanked 335 Times in 327 Posts
    For the error A1ien51 mentioned, these are javascript errors. There is a small yellow triangle in the lower-left-hand of the browser window that you can click on to see the details.

    I also notice some output from your PHP code at the bottom of the page -
    Code:
    ."\n"
    This is probably caused by an incorrectly formed string/some code after a closing ?> php tag.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #5
    Regular Coder
    Join Date
    Aug 2005
    Location
    Canada
    Posts
    137
    Thanks
    2
    Thanked 0 Times in 0 Posts
    Thanks, I got rid of the \n.
    Also I got rid of all the errors in IE, and it is still not working.

  • #6
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,151
    Thanks
    2
    Thanked 335 Times in 327 Posts
    At the link in your first post, there are still javascript errors.
    If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.

  • #7
    Regular Coder
    Join Date
    Aug 2005
    Location
    Canada
    Posts
    137
    Thanks
    2
    Thanked 0 Times in 0 Posts
    OK, now I'm not getting an errors, but it's still not working.

  • #8
    Regular Coder
    Join Date
    Aug 2005
    Location
    Canada
    Posts
    137
    Thanks
    2
    Thanked 0 Times in 0 Posts
    OK, I've managed to make it work.
    I'm using these two functions:
    Code:
    <script language="javascript" type="text/javascript">
    <!--
    function ship_goto( menuform )
    {
        var baseurl = "shipinfo.php?ship=" ;
        selecteditem = menuform.ship_class.selectedIndex ;
        ship_class = menuform.ship_class.options[ selecteditem ].value ;
        if (ship_class.length != 0) {
          //location.href = baseurl + newurl ;
          ajaxpage(baseurl + ship_class, "shipinfo");
        }
    }
    
    function alt_goto( menuform )
    {
        var baseurl = "shipinfo.php?ship=" ;
        selecteditem = menuform.alt_class.selectedIndex ;
        alt_class = menuform.alt_class.options[ selecteditem ].value ;
        if (alt_class.length != 0) {
          //location.href = baseurl + newurl ;
          ajaxpage(baseurl + alt_class, "shipinfo");
        }
    }
    //-->
    </script>
    And then I just do something like this:
    Code:
    <select name="ship_class" onchange="ship_goto(this.form)">


  •  

    Posting Permissions

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