sirio Posted September 27, 2006 Share Posted September 27, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/22293-refresh-part-of-a-page/ Share on other sites More sharing options...
chopperwalker Posted September 28, 2006 Share Posted September 28, 2006 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"); Quote Link to comment https://forums.phpfreaks.com/topic/22293-refresh-part-of-a-page/#findComment-99992 Share on other sites More sharing options...
sirio Posted September 28, 2006 Author Share Posted September 28, 2006 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_usernameFROM ".$prefix."_bbtopics AS tLEFT 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. Quote Link to comment https://forums.phpfreaks.com/topic/22293-refresh-part-of-a-page/#findComment-100289 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.