Jump to content

Archived

This topic is now archived and is closed to further replies.

sirio

Refresh part of a page

Recommended Posts

I posted this in the wrong forum of this website, so i repeat:
I'm running my website with php-nuke, n my forums are the well known phpbb forums.
In the main page of my website, i have a script that shows the last topics in the forums... so i wanted to know if it is possible to refresh ONLY that part of the page (and not the parent page) clicking on a link or button. Maybe in php? javascript?...

I've been searching, and i found nothing.

Somebody suggested me to use ajax, but i want a better way to solve this.

Thanks.

Share this post


Link to post
Share on other sites
You could use an iframe and simply have a refresh link that targets it. Other than that you would probably have to use an http_request and some javascript ("ajax");

Share this post


Link to post
Share on other sites
ok, i've made an iframe to do it, but i get an error message.

In index.php, i wrote:
<iframe src="foros.php" width="100%" height="200"></iframe>

and when i run the index, i get this:

[quote]Fatal error: Call to a member function on a non-object in /data/members/free/tripod/es/l/a/t/latinquasar/htdocs/foros.php on line 28[/quote]

Line 28:
[quote]$result = $db->sql_query( "SELECT t.topic_id, t.topic_first_post_id, t.forum_id, t.topic_last_post_id,
t.topic_title, t.topic_poster, t.topic_views, t.topic_replies, t.topic_moved_id, p.poster_id,
p.post_time, u.username, l.username, u.user_id, tx.post_text, p.post_username, f.post_username
FROM ".$prefix."_bbtopics AS t
LEFT JOIN ".$prefix."_bbposts AS p ON (p.post_id = t.topic_last_post_id)
LEFT JOIN ".$prefix."_bbposts AS f ON (f.post_id = t.topic_first_post_id)
LEFT JOIN ".$prefix."_bbposts_text AS tx ON (p.post_id = tx.post_id)
LEFT JOIN ".$user_prefix."_users AS u ON (u.user_id=p.poster_id)
LEFT JOIN ".$user_prefix."_users AS l ON (l.user_id=t.topic_poster)
ORDER BY t.topic_last_post_id DESC LIMIT 0, $Last_New_Topics");[/quote]

foros.php is just a block in phpnuke.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.