|
 |
Enjoy an ad free experience by logging in. Not a member yet? Register.
|
|
|
|
03-19-2012, 12:50 PM
|
PM User |
#1
|
|
New Coder
Join Date: Nov 2002
Posts: 99
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==4 && xmlhttp.status==200)
{
document.getElementById("myDiv").innerHTML=xmlhttp.responseText;
}
}
xmlhttp.open("GET","artist_title.php?imgid=" + imgID ,true);
xmlhttp.send();
}
</script>
|
|
|
|
03-19-2012, 12:57 PM
|
PM User |
#2
|
|
New Coder
Join Date: Nov 2002
Posts: 99
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();
|
|
|
03-19-2012, 01:01 PM
|
PM User |
#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?
|
|
|
03-19-2012, 01:10 PM
|
PM User |
#4
|
|
New Coder
Join Date: Nov 2002
Posts: 99
Thanks: 13
Thanked 0 Times in 0 Posts
|
I wrote it yes
|
|
|
03-19-2012, 02:15 PM
|
PM User |
#5
|
|
New Coder
Join Date: Nov 2002
Posts: 99
Thanks: 13
Thanked 0 Times in 0 Posts
|
Any takers?
|
|
|
03-19-2012, 02:19 PM
|
PM User |
#6
|
|
Banned
Join Date: Apr 2011
Posts: 656
Thanks: 14
Thanked 69 Times in 69 Posts
|
Quote:
Originally Posted by dk4210
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
|
|
|
03-19-2012, 02:21 PM
|
PM User |
#7
|
|
New Coder
Join Date: Nov 2002
Posts: 99
Thanks: 13
Thanked 0 Times in 0 Posts
|
Wow? Bad morning for ya huh?
|
|
|
03-19-2012, 02:27 PM
|
PM User |
#8
|
|
Banned
Join Date: Apr 2011
Posts: 656
Thanks: 14
Thanked 69 Times in 69 Posts
|
Quote:
Originally Posted by dk4210
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..
|
|
|
03-19-2012, 02:44 PM
|
PM User |
#9
|
|
New Coder
Join Date: Nov 2002
Posts: 99
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..
|
|
|
03-19-2012, 02:55 PM
|
PM User |
#10
|
|
Banned
Join Date: Apr 2011
Posts: 656
Thanks: 14
Thanked 69 Times in 69 Posts
|
Quote:
Originally Posted by dk4210
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
|
|
|
03-19-2012, 02:58 PM
|
PM User |
#11
|
|
New Coder
Join Date: Nov 2002
Posts: 99
Thanks: 13
Thanked 0 Times in 0 Posts
|
Maybe SOME ONE else will
|
|
|
03-19-2012, 03:25 PM
|
PM User |
#12
|
|
New Coder
Join Date: Nov 2002
Posts: 99
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); } });
|
|
|
 |
Jump To Top of Thread
| Thread Tools |
|
|
| Rate This Thread |
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +1. The time now is 07:12 AM.
|
Advertisement Log in to turn off these ads. |
|
|
|
|
|
|
|
|
|
|