Go Back   vBulletin Modification Discussions > Coding Discussions > PHP Discussions, Tutorials and Help
Home Register FAQ Members List Calendar Mark Forums Read
vBSEO Info Tags

About This Page: This is a discussion on AJAX question within the PHP Discussions, Tutorials and Help forums, part of the Coding Discussions category, at vBulletin Modification Discussions. Hi all, I've got a table on showthread that I would like to refresh with the quick reply to fetch new live data. I can easily get a div in the table switched from 'none' to '' by adding a


Reply
 
LinkBack Thread Tools
Old 06-26-2007, 01:34 AM   #1 (permalink)
Junior Member
 
Join Date: May 2007
Posts: 9
|Acheron| is on a distinguished road
iTrader: (0)
AJAX question

Hi all,

I've got a table on showthread that I would like to refresh with the quick reply to fetch new live data. I can easily get a div in the table switched from 'none' to '' by adding a line in vbulletin_quick_reply.js like

Code:
fetch_object('my_div_id').style.display = '';
... but of course that doesn't help me when the table contains live data. Is there anyone who can lend a hand here? To reiterate, I simply want this table refreshed on quick reply using AJAX. TIA :-)

* testing

Last edited by |Acheron| : 06-30-2007 at 06:01 PM.
|Acheron| is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links

Old 06-26-2007, 06:03 PM   #2 (permalink)
Administrator
 
Code Monkey's Avatar
 
Join Date: May 2006
Posts: 2,193
Code Monkey is on a distinguished road
iTrader: (0)
Re: AJAX question

You would need to offer much more info than that. That's much to vague.
__________________
Please do not PM me unless it's personal. General vBulletin or mod questions by PM will be ignored.

Try the vBSEO Demo

Click here for Instant Community
Code Monkey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-28-2007, 03:26 AM   #3 (permalink)
Junior Member
 
Join Date: May 2007
Posts: 9
|Acheron| is on a distinguished road
iTrader: (0)
Re: AJAX question

OK, will do my best Code Monkey.

I have a problem/solution forum, much like the one I've come across on google many times where it says 'Reply to View the Solution.'

The solution is in a table at the top of the thread evaluated in showthread.php When a user replies to the post, I would like this table re-evaluated so they can then view the solution.

Obviously they could just refresh showthread but that would confuse the heck out of them. So I figured I would either try to get some help on the ajax solution or I suppose I could disable ajax so the standard redirect is used - but that would make me sad (ajax is nice).

PHP/MySQL I do fine but I never got a handle on .js and now ajax has really got me lost. I understand the concept and small bits of the code, but I'm just not able to throw anything together.
|Acheron| is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 06-28-2007, 07:58 AM   #4 (permalink)
Administrator
 
Code Monkey's Avatar
 
Join Date: May 2006
Posts: 2,193
Code Monkey is on a distinguished road
iTrader: (0)
Re: AJAX question

You need to be able to identify the elements that contain different bits of data. There are many ways to do this but all will involve using javascript and DOM, AJAX. I would just assign an id attribute to the div. Then when they reply I would empty the contents and use javascript to create all data. Then place that data in the div.

You're going to need to educate yourself on the basics of javascript and DOM. You might want to check out Simply JavaScript or the AJAX books at Sitepoint. Practical Books for Web Developers and Designers Their books are always well laid out and you can usually download the first four chapters for free.

Once you get AJAX it's pretty easy from their on out.
__________________
Please do not PM me unless it's personal. General vBulletin or mod questions by PM will be ignored.

Try the vBSEO Demo

Click here for Instant Community
Code Monkey is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply
Tags: , ,





Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


A vBSkinworks Design Recoded By vBModder.
All Code Distributed On This Site is © 2006 by it's author.
Search Engine Optimization by vBSEO 3.1.0

All times are GMT -7. The time now is 08:02 AM.
Online Users 72
Registered 1
Guests 71
Members 3141
Active Members 225
Threads 1574
Posts 6981
Top poster: Code Monkey (2193)
Welcome to our newest member, Stutoman
Most users ever online was 235, 04-11-2007 at 08:59 AM.
Speak Out! vBulletin gets the web talking!


vBulletin Setup SEO

vBulletin graphics resource images