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 12 of 12
  1. #1
    Regular Coder
    Join Date
    Nov 2002
    Posts
    103
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Comverting Ajax call to jquery

    Hello Guys,

    I need some help converting this ajax call to a jquery but I am clueless to how to do it.. Please advise

    Here is my code

    PHP Code:
    <script type="text/javascript">
      function 
    loadXMLDoc(imgID,isSold,order)
      {
      if(
    isSold == 1)
      $(
    '.soldWatermark').css('display','');
      else
      $(
    '.soldWatermark').css('display','none');
      var 
    xmlhttp;
      if (
    window.XMLHttpRequest)
      {
    // code for IE7+, Firefox, Chrome, Opera, Safari
      
    xmlhttp=new XMLHttpRequest();
      }
      else
      {
    // code for IE6, IE5
      
    xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
      
    xmlhttp.onreadystatechange=function()
      {
      if (
    xmlhttp.readyState==&& xmlhttp.status==200)
      {
      
    document.getElementById("myDiv").innerHTML=xmlhttp.responseText;

      }
      }
      
    xmlhttp.open("GET","artist_title.php?imgid=" imgID ,true);
      
    xmlhttp.send();
      }



    </script> 

  • #2
    Regular Coder
    Join Date
    Nov 2002
    Posts
    103
    Thanks
    13
    Thanked 0 Times in 0 Posts

    Getting Object doesn't support this property or method

    The reason I want to change it to jquery is because I am seeing a strange error.

    When loading my site in IE - http://frameworksgallery.com/view_ar...id=Baskin_Fran

    1. I click on the second thumbnail.
    2. I click on the third thumb
    3. I go back to the second thumb

    The large image does not display after re clicking.

    IE web developer tool says it is this that it's having an issue with

    PHP Code:
    xmlhttp=new XMLHttpRequest(); 

  • #3
    Banned
    Join Date
    Apr 2011
    Posts
    656
    Thanks
    14
    Thanked 69 Times in 69 Posts
    Did you write that code?

    Is
    Code:
    $('.soldWatermark').css('display','');
    jQuery code?

  • #4
    Regular Coder
    Join Date
    Nov 2002
    Posts
    103
    Thanks
    13
    Thanked 0 Times in 0 Posts
    I wrote it yes

  • #5
    Regular Coder
    Join Date
    Nov 2002
    Posts
    103
    Thanks
    13
    Thanked 0 Times in 0 Posts
    Any takers?

  • #6
    Banned
    Join Date
    Apr 2011
    Posts
    656
    Thanks
    14
    Thanked 69 Times in 69 Posts
    Quote Originally Posted by dk4210 View Post
    Any takers?
    You haven't answered my second question yet, which is your choice to make obviously, just as it is then my choice to not reply from here on.

    Hopefully someone else will help you

  • #7
    Regular Coder
    Join Date
    Nov 2002
    Posts
    103
    Thanks
    13
    Thanked 0 Times in 0 Posts
    Wow? Bad morning for ya huh?

  • #8
    Banned
    Join Date
    Apr 2011
    Posts
    656
    Thanks
    14
    Thanked 69 Times in 69 Posts
    Quote Originally Posted by dk4210 View Post
    Wow? Bad morning for ya huh?
    No not all But if you choose to not answer my question, surely you're not sugessting that I should then answer yours anyway are you?
    Last edited by webdev1958; 03-19-2012 at 02:33 PM.

  • #9
    Regular Coder
    Join Date
    Nov 2002
    Posts
    103
    Thanks
    13
    Thanked 0 Times in 0 Posts
    Well I appreciate your attempt to help me.. You didnt have to offer any help, but you did.

    To answer the other half of your question. I am not sure.. I believe it's ajax actually..

  • #10
    Banned
    Join Date
    Apr 2011
    Posts
    656
    Thanks
    14
    Thanked 69 Times in 69 Posts
    Quote Originally Posted by dk4210 View Post
    To answer the other half of your question. I am not sure.. I believe it's ajax actually..
    ok, then if you're unsure and you think

    Code:
    $('.soldWatermark').css('display','');
    is AJAX then either you didn't write that code like you claim or I have no idea what I'm talking about here so hopefully someone else will help you.

    Good luck

  • #11
    Regular Coder
    Join Date
    Nov 2002
    Posts
    103
    Thanks
    13
    Thanked 0 Times in 0 Posts
    Maybe SOME ONE else will

  • #12
    Regular Coder
    Join Date
    Nov 2002
    Posts
    103
    Thanks
    13
    Thanked 0 Times in 0 Posts
    Issue resolved. Found answer on another board..Very helpful folks over there

    Here is the code

    PHP Code:
    $.ajax({
        
    url"artist_title.php",
        
    data"imgid=" imgID,
        
    success: function(data)
        {
            $(
    "#myDiv").html(data);
        }
    }); 


  •  

    Posting Permissions

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