+ Reply to Thread
Results 1 to 9 of 9

Thread: problem with AJAX

  1. #1
    alvaroag's Avatar
    alvaroag is offline x10 Sophmore alvaroag is an unknown quantity at this point
    Join Date
    May 2006
    Posts
    144

    problem with AJAX

    I have a photo gallery using AJAX. When the user clicks on the photo thumbnail, the image should appear on the top of the page, inside a div writen dinamically using javascript. That works OK under Opera, Firefox, and IE7. But the problem is when using IE6. The image doesn't appears. And most of my users use IE6. Does anyone knows how to fix this? The website is http://larcenciel2006.x10hosting.com/phalbum.php?ajax=1.

    Thanks

    Alvaro
    Last edited by alvaroag; 12-23-2006 at 08:04 AM.

  2. #2
    oab's Avatar
    oab
    oab is offline
    x10 Lieutenant oab is an unknown quantity at this point
    Join Date
    Apr 2005
    Location
    Olympia, WA
    Posts
    459

    Re: problem with AJAX

    most likely your using the wrong connection
    in internet explorer you have to use activex objects...
    heres my function i cant remember where i got it it was a while ago.

    Code:
    function getHTTPObject() {
      var xmlhttp;
      /*@cc_on
      @if (@_jscript_version >= 5)
        try {
          xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
          try {
            xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
          } catch (E) {
            xmlhttp = false;
          }
        }
      @else
      xmlhttp = false;
      @end @*/
      if (!xmlhttp && typeof XMLHttpRequest != 'undefined') {
        try {
          xmlhttp = new XMLHttpRequest();
        } catch (e) {
          xmlhttp = false;
        }
      }
      return xmlhttp;
    }
    var http = getHTTPObject();
    then just use http.open, http.send, ect.
    http://www.teamoab.com

    aim:dknigh73
    msn:d_knight_3@hotmail.com

  3. #3
    alvaroag's Avatar
    alvaroag is offline x10 Sophmore alvaroag is an unknown quantity at this point
    Join Date
    May 2006
    Posts
    144

    Re: problem with AJAX

    added the jscript connection part, but still it doesn't works. I works on Opera 9.02, IE 7, Firefox 2.0, and K-Meleon 1.02. But it doesnt works on IE6. The mthumbnails are shown up without problems, but when you click on an thumb it should show you the big image on the upper part, but that big image(640*480) doesn't shows up only with IE6.

  4. #4
    oab's Avatar
    oab
    oab is offline
    x10 Lieutenant oab is an unknown quantity at this point
    Join Date
    Apr 2005
    Location
    Olympia, WA
    Posts
    459

    Re: problem with AJAX

    add some fotos so i can test it please.
    http://www.teamoab.com

    aim:dknigh73
    msn:d_knight_3@hotmail.com

  5. #5
    alvaroag's Avatar
    alvaroag is offline x10 Sophmore alvaroag is an unknown quantity at this point
    Join Date
    May 2006
    Posts
    144

    Re: problem with AJAX

    there are a lot of photos... but they are inside the different categories. try with this : http://larcenciel2006.x10hosting.com...p?ajax=1&gtc=9 . that link will take you directly to one of the categories.

  6. #6
    oab's Avatar
    oab
    oab is offline
    x10 Lieutenant oab is an unknown quantity at this point
    Join Date
    Apr 2005
    Location
    Olympia, WA
    Posts
    459

    Re: problem with AJAX

    add the if statement

    if (AJAX_Object.readyState == 4){
    }

    to your function that actually diplays the image.

    EDIT: nope nvm i dont think thatll make a difference sorry dude cant help you.
    Last edited by oab; 01-17-2007 at 12:58 AM.
    http://www.teamoab.com

    aim:dknigh73
    msn:d_knight_3@hotmail.com

  7. #7
    t2t2t's Avatar
    t2t2t is offline x10 Elder t2t2t is an unknown quantity at this point
    Join Date
    Sep 2006
    Location
    Europe, Estonia
    Posts
    690

    Re: problem with AJAX

    I see photos after doing right-click -> show images on image space.

    Maybe there is a problem with image showing?
    This post has been marked spam 52 times.


  8. #8
    oab's Avatar
    oab
    oab is offline
    x10 Lieutenant oab is an unknown quantity at this point
    Join Date
    Apr 2005
    Location
    Olympia, WA
    Posts
    459

    Re: problem with AJAX

    im not sure how his display image function works but maybe try using the DOM method if you arent already.

    should be able to google it.

    oh wait you dont even need to use ajax to display the images, just for the comments, for the image you can just do

    Code:
    document.getElementById('imagediv').innerHTML = "html code to display image';
    or even better use the DOM method like i mentioned before.

    Code:
    document.createElement(’img’);
    img.src = "image.gif";
    Last edited by oab; 01-17-2007 at 07:36 PM.
    http://www.teamoab.com

    aim:dknigh73
    msn:d_knight_3@hotmail.com

  9. #9
    alvaroag's Avatar
    alvaroag is offline x10 Sophmore alvaroag is an unknown quantity at this point
    Join Date
    May 2006
    Posts
    144

    Re: problem with AJAX

    Quote Originally Posted by t2t2t View Post
    I see photos after doing right-click -> show images on image space.

    Maybe there is a problem with image showing?
    I hadn't tried that before(right click->show image). that way, it works. but when i tried to make that refresh automatically, it didn't worked. thanks anyway.


    Quote Originally Posted by oab View Post
    im not sure how his display image function works but maybe try using the DOM method if you arent already.

    should be able to google it.

    oh wait you dont even need to use ajax to display the images, just for the comments, for the image you can just do

    Code:
    document.getElementById('imagediv').innerHTML = "html code to display image';
    or even better use the DOM method like i mentioned before.

    Code:
    document.createElement(’img’);
    img.src = "image.gif";
    I don't use exactly the .innerHTML property, because of compatibility issues(not al browsers support that). instead, I use a function which selects automatically between three methods of writing a div. the innerHTML is one of them.

    The DOM usage was a great idea. i'm now using it for the image showing, and it works under any navigator(IE6,IE7,Firefox 2,Opera 9, K-Meleon 1, and maybe more). I'm planning to convert the rest of the page to use DOM. It's really better than writing the HTML code directly.

    thanks a lot!

    Alvaro

+ Reply to Thread

Similar Threads

  1. Problem uploading image (GD library problem)
    By HyDr@ in forum Free Hosting
    Replies: 1
    Last Post: 12-01-2006, 04:27 PM
  2. CGI problem maybe?
    By boblake in forum Scripts & 3rd Party Apps
    Replies: 0
    Last Post: 08-24-2006, 04:15 AM
  3. ads included by ajax
    By agustinvinao in forum Free Hosting
    Replies: 1
    Last Post: 05-28-2006, 12:44 AM
  4. Ad code problem!
    By Akkarin in forum Free Hosting
    Replies: 8
    Last Post: 08-29-2005, 10:39 AM
  5. Ftp Timeout problem
    By ironcross77 in forum Free Hosting
    Replies: 7
    Last Post: 04-12-2005, 08:53 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers