Jump to content

Refresh part of a page


sirio

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.
Link to comment
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.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.