- Joined
- Apr 5, 2012
- Messages
- 113
- Reaction score
- 8
deleted
Last edited:
Hello EliteGM
Thanks for the answer it helped me to some extend. Now i have a last problem occuring:
My Output:
PHP:<?php require_once('../pe13f/SSI.php'); require_once ('../PE13/smf_2_api.php'); ?> <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> <script> function MakeRequest(id) { $.ajax({ url : 'display.php', data:{"id":id}, type: 'GET', success: function(data){ $('#streaminnern').html(data); } }); } </script> <div id="stream" class="bg4 roundedcrop shadow"> <div class="ph25 pv20"> <h1>News</h1> <input id="streamcnt" name="streamcnt" type="hidden" value="" /> </div> <div id="streamadd"></div> <div id="streaminnern"> <?php $num_recent = 5; ssi_ErecentTopics($num_recent, $exclude_boards = null, $include_boards = 2, $output_method = 'echo'); ?> </div> <a id=""><div onclick="MakeRequest(<?php echo $num_recent; ?>);" id="streammore">More News articles</div></a> </div>
and the backend display.php
PHP:<?php $num_recent = $_GET['id']+5; ssi_ErecentTopics($num_recent, $exclude_boards = null, $include_boards = 2, $output_method = 'echo'); ?>
After clicking "More News articles" I can see in the Developer mode in chrome this error:
Code:GET http://eubboline.net/connuh/display.php?id=5 500 (Internal Server Error) jquery.js:9597
You'd have to be retarded to offer that as a solution to his problem, if you aren't going to offer any help then don't bother posting.
It would have taken less time to actually tell him what he needed to do. Considering googling 500 error would give you a bunch of useless articles.
/done_ranting
Check your php error log this can be caused by any number things.
<?php
require_once('../pe13f/SSI.php');
require_once ('../PE13/smf_2_api.php');
ssi_ErecentTopics($num_recent = $_GET['id'], $exclude_boards = null, $include_boards = 2, $output_method = 'echo');
?>
<?php
require_once('../pe13f/SSI.php');
require_once ('../PE13/smf_2_api.php');
?>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script type="text/javascript">
var num_recent = 5; //Start of the script, num_recent is 5.
function MakeRequest()
{
num_recent += 5; //We know that we're going to load 5 more news items.
$.ajax({
type: 'GET',
url: 'display.php',
data: {
'id': num_recent //So that's already got that +5 increment on it
},
success: function(data) {
$('#streaminnern').html(data);
}
});
}
</script>
<div id="stream" class="bg4 roundedcrop shadow">
<div class="ph25 pv20">
<h1>News</h1>
<input id="streamcnt" name="streamcnt" type="hidden" value="" />
</div>
<div id="streamadd"></div>
<div id="streaminnern">
<?php ssi_ErecentTopics($num_recent = 5, $exclude_boards = null, $include_boards = 2, $output_method = 'echo'); ?>
</div>
<div onclick="MakeRequest();" id="streammore">More News articles</div>
</div>