Welcome to Bookgalaxy. We hope you enjoy your visit.


You're currently viewing our forum as a guest. This means you are limited to certain areas of the board and there are some features you can't use. If you join our community, you'll be able to access member-only sections, and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free.

As a guest, you also have access to the Logbook, where you can ask questions and leave feedback for the Admins to see.


Join our community!


If you're already a member please log in to your account to access all of our features:

If you can't log in or have any other problems feel free to Email us at bookgalaxy@hotmail.com

Username:   Password:
Add Reply
Anyone good with Codes?
Topic Started: May 4, 2010, 12:42 pm (757 Views)
Free4ever747
Member Avatar
Master Poster
Ok, I've been trying to make this code more efficient, but I haven't been able to figure out how to reduce the amount of AJAX requests. And now the code doesnt want to work for me at all...Anyone have any Suggestions?

Code:
 
<script type="text/javascript">
$("td.c_username a.member").each(function(){
var c = this;
$.get(this.href,function(data){
b = $('td.c_desc:contains(Groups Joined)',data).next().html();
if(!b) b = "None";
$(c).parent().parent().next().children("td.c_user").children("dl.user_info").append("<dt>Groups Joined:</dt><dd>"+b+"</dd>");
});
});
</script>
Posted Image
Posted ImagePosted ImagePosted ImagePosted Image
don't click this link...

Offline Profile Quote Post Goto Top
 
Wolverien
Member Avatar
Newbie
I'll admit I'm not really into the whole JavaScript thing, but shouldn't there be a period instead of a comma in this line?

$.get(this.href,function(data){

Oh, on the next line as well?

b = $('td.c_desc:contains(Groups Joined)',data).next().html();

Good luck! :P
Offline Profile Quote Post Goto Top
 
1 user reading this topic (1 Guest and 0 Anonymous)
« Previous Topic · Help Desk · Next Topic »
Add Reply

Innovation created by Lydia of ZetaBoards Theme Zone