I've tried different codes, but the codes always not working. I want to reload just the specific section every 5 seconds, not reloading the whole page. It's important not to refresh the whole page, because it includes an chat function. If I would reload the whole page, people can't enter text without loosing it every 5 seccond. Like I said, I've tried some codes from stackOverflow but somehow they don't work for me.
Here's my code
<script type="text/javascript">
$(document).ready(function(){
setInterval(function(){
$("#context").load(window.location.href + " #context" );
}, 5000);
});
</script>
<--variables explained --->
$fid = $_GET['fid']
$username = $_SESSION['username']
$db :
$servername = "localhost";
$dbname = "psychopath";
$username = "root";
$password = "";
try{
$dsn = "mysql:host=" . $servername . ";dbname=" . $dbname;
$db = new PDO($dsn, $username, $password);
echo "";
}catch(PDOException $e){
echo $e.getMessage();
}
<--- variables END ----->
$display_messages = $db->prepare("SELECT * FROM mychat_from WHERE (user_to_name = ? OR userfrom_name = ?) AND (user_to_id = ? OR userfrom_id = ?)");
$display_messages->execute([$username , $username, $fid, $fid]);
while($row=$display_messages->fetch(PDO::FETCH_ASSOC)){
$userfrom = $row['userfrom'];
if($userfrom != $username){
$messagefrom2 = $row['message_from'];
$messagefrombreak2 = wordwrap($messagefrom2, 27, "\n", true);
?>
<?php
?><section id="context" name="context"><?php echo '<b> '.$userfrom.'</b>said:<br>';
echo "<section style='background: black; float: left; margin-left: 5px; border-radius: 7px; color: white;'> <font style='float: left;'> ".$messagefrombreak2."</font></section>";?>
</section>
<?php echo "<br><br>";
?>
And here is full code:
<!-- end snippet -->if(isset($_GET['fid'])){
$fid = $_GET['fid'];
?>
<section>
<section>
<?php
$get_friend = $db->prepare("do stuff");
$get_friend->execute([$fid]);
while($row=$get_friend->fetch(PDO::ROW STUFF)){
}
?>
</section>
<section>
<?php
$username = $_SESSION['username'];
$get_id = $db->prepare("do stuff");
$get_id->execute([$fid]);
while($row=$get_id->fetch(ROW STUFF)){
$get_your_id = $db->prepare("do stugg");
$get_your_id->execute([$username]);
while($row=$get_your_id->fetch(ROW STUFF)){
$display_messages = $db->prepare("DO STUFF");
$display_messages->execute([$your_id, $your_id, $fid, $fid]);
while($row=$display_messages->fetch(DO STUFF)){
$userfrom = $row['userfrom'];
if($userfrom != $username){
$messagefrom2 = $row['message_from'];
$messagefrombreak2 = wordwrap($messagefrom2, 27, "\n", true);
?>
<?php
?><div id="container" name="container"><div id="context" name="context"><?php echo '<b> '.$userfrom.'</b>said:<br>';
echo "<section style='background: black; float: left; margin-left: 5px; border-radius: 7px; color: white;'> <font style='float: left;'> ".$messagefrombreak2."</font></section>";?>
</div></div>
<?php echo "<br><br>";
?>
<script type="text/javascript">
$(document).ready(function(){
setInterval(function(){
$("#context").load(window.location.href + " #container" );
}, 5000);
});
</script>
<?php
}else{
$messagefrom = $row['message_from'];
$messagefrombreak = wordwrap($messagefrom, 27, "\n ", true);
echo "<font style='float: right;'><b>You </b>said: </font><br>";
echo "<section style='background: #960505; float: right; margin-right: 5px; border-radius: 7px; color:
white;'><font style='float: right;'> ".$messagefrombreak." </font></section><br><br>";
}}}}
?>
</section>
use ajax and json
ajax to make a call to server within the page
json little simple format
use setInterval
like
var myVar = setInterval(my_func, 5000);
my_func is a function that will hold ajax action. and do what do you need
Related
I have googled a lot regarding this, and actually couldn't find any solution.
This is what I have in my .phtml file:
<?php foreach($items as $item):?>
........................
............
<?php $count = 1;?>
<div id="new-script-<?php echo $count . "-". $item->getId();?>">
<script type="text/javascript">
var dthen<?php echo $count; ?> = new Date("<?php echo Date("m/d/y", strtotime($toDate)).' 11:59:59 PM'; ?>");
var start = "02/10/16 14:57:49";
start_date = Date.parse(start);
var dnow<?php echo $count; ?> = new Date(start_date);
if(CountStepper>0)
ddiff= new Date((dnow<?php echo $count; ?>)-(dthen<?php echo $count; ?>));
else
ddiff = new Date((dthen<?php echo $count; ?>)-(dnow<?php echo $count; ?>));
gsecs<?php echo $count; ?> = Math.floor(ddiff.valueOf()/1000);
var iid<?php echo $count; ?> = "countbox_<?php echo $count; ?>";
CountBack(gsecs<?php echo $count; ?>,"countbox_"+timer, timer);
timer++;
</script>
<?php $count = $count + 1; ?>
</div>
................
<?php endforeach;?>
As you can see I have got few php variable called inside script. Which is why I cannot keep this script in external file.
And my ajax code:
jQuery(document).ready(function() {
jQuery.ias({
dataType: 'text',
container : ".category-products",
item : "ol.products-pack-list",
next : "a.next",
pagination : '.pages',
loader : '<div style="width:100%; display:block; min-height:100px;"><p class="cateogry-loader loader" id="loading_mask_loader" style="margin:0 auto; width: 150px; padding: 15px 30px; background: #fff4e9; border: 2px solid #f1af73; color: #d85909; font-weight: bold; text-align: center; z-index: 1000;"><img src="/image/ajax-loader-tr.gif" alt="Loading..."><br>Please wait...</p></div>',
triggerPageThreshold : 9999
});
});
And this is in my <head> tag:
<script type="text/javascript" src="https://www.digitalcinema.com.au/skin/frontend/enterprise/helloshopper/js/auto-load/jquery-ias.min.js"></script>
Now, this works fine, however I also have a infinite-ajax-scroll in place to load all my result. Which is causing the issue here.
After each ajax scroll, my <script> just disappears. I am not able to prevent this. Please suggest.
I had also asked this to the above extension writer, haven't answered yet.
https://github.com/webcreate/infinite-ajax-scroll/issues/218
My rendered html
First page before ias call
<li class="item odd 1">
<div id="new-script-1">
<script type="text/javascript">
var dthen1 = new Date("02/14/16 11:59:59 PM");
start_date = Date.parse(start);
var dnow1 = new Date(start_date);
if(CountStepper>0)
ddiff= new Date((dnow1)-(dthen1));
else
ddiff = new Date((dthen1)-(dnow1));
gsecs1 = Math.floor(ddiff.valueOf()/1000);
var iid1 = "countbox_1";
CountBack(gsecs1,"countbox_"+timer, timer);
timer++;
</script>
</div>
Second page after ias call
<li class="item odd 1">
<div id="new-script-1-100">
<script type="text/javascript">
var dthen1 = new Date("02/14/16 11:59:59 PM");
start_date = Date.parse(start);
var dnow1 = new Date(start_date);
if(CountStepper>0)
ddiff= new Date((dnow1)-(dthen1));
else
ddiff = new Date((dthen1)-(dnow1));
gsecs1 = Math.floor(ddiff.valueOf()/1000);
var iid1 = "countbox_1";
CountBack(gsecs1,"countbox_"+timer, timer);
timer++;
</script>
</div>
</li>
<li class="item even 2">
<div id="new-script-2-101">
</div>
</li>
See second list and it's content, whole script is disappeared.
I have append the ajax coding, data are coming fine, here during appending this style="position: absolute; left: 468px; top: 0px;" css is not adding to my new append data. How can I do this? Below is my ajax code. Please suggest me.
See image here
<?php
$per_page=20;
$latestImages = mysql_query("select * from ".GIFIMAGES." WHERE isActive = '1' AND not_update='1' order by modified ");
$total_record=mysql_num_rows($latestImages)/5;
$maxPage=number_format((float) $total_record, 2, '.', '');
?>
<script>
var lastX = 0;
var currentX = 0;
var page = 1;
function loadMore() {
if (page < '<?php echo $maxPage;?>') {
page++;
$('#load-more').html('Loading...');
$.post("ajax_append.php", {'ajax_append':'<?php echo $per_page;?>','page':page},function(data)
{
alert(data);
$('#homeload').append(data);
$('#load-more').html('VIEW MORE');
});
} else {
$('#load-more').hide();
}
}
</script>
Below is external(html) file append coding.(grid-splash-item)No css is calling for this same class, which I have been used in pageloading.plz check it.
<?php
$i=50;
$latestImages = mysql_query("select * from ".GIFIMAGES." WHERE isActive = '1' AND not_update='1' order by modified DESC limit $total_records,$page_records");
while($getLatestGif=mysql_fetch_array($latestImages)){
$i++;
$categoryName = mysql_fetch_array(mysql_query("select name from ".CATEGORY." where id='".$getLatestGif['cat_id']."'"));
$checkLatestUsers = mysql_num_rows(mysql_query("select * from ". YEAH." where user_id = '".$_SESSION['USER_ID']."' and gifimageid ='".$getLatestGif['id']."'"));
$yeahCount = mysql_num_rows(mysql_query("select gifimageid from ". YEAH ." where gifimageid = '".$getLatestGif['id']."'"));
$yeahCountLatest = mysql_query("update ".GIFIMAGES." set yeahCount ='$yeahCount' where id = '".$getLatestGif['id']."'");
$comment = mysql_query("select * from ".COMMENTS." where gifid='". $getLatestGif['id']."' order by id desc");
$getLatestUser=mysql_fetch_array(mysql_query("SELECT username,photo FROM ".TBL_USERS." WHERE id='".$getLatestGif['userId']."'"));
$commnetsCounts = mysql_num_rows($comment);
?>
<div class="grid-splash-item">
<!-- <img src="images/img-2.jpg" /> -->
<a href="<?php echo HTTP_ROOT.'funny-'.$categoryName['name'].'-images/'. makeSeoUrl($getLatestGif['title']).'/'.$getLatestGif['uniq_id'];?>" > <img width="198" height="169" src="<?php echo HTTP_ROOT.DIR_GIF.$getLatestGif['gifphoto'];?>" /> </a>
<div class="gif-details">
<div class="gif-details-menu">
<span>
<div class="gif-details-menu-box" <?php if(!empty($_SESSION['USER_ID']) && $checkLatestUsers){?> <?php } else {?> <?php } ?>>
//My coding present.I have removed it(too long).
</div>
</span>
<p><?php echo substr($getLatestGif['title'],0,20);?></p>
</div>
</div>
</div>
<?php } ?>
try adding the inline css in html only like,
change this
<div class="grid-splash-item">
to
<?php
$counter = 1;
while ($getLatestGif = mysql_fetch_array($latestImages)) {
$i++;
$categoryName = mysql_fetch_array(mysql_query("select name from " . CATEGORY . " where id='" . $getLatestGif['cat_id'] . "'"));
$checkLatestUsers = mysql_num_rows(mysql_query("select * from " . YEAH . " where user_id = '" . $_SESSION['USER_ID'] . "' and gifimageid ='" . $getLatestGif['id'] . "'"));
$yeahCount = mysql_num_rows(mysql_query("select gifimageid from " . YEAH . " where gifimageid = '" . $getLatestGif['id'] . "'"));
$yeahCountLatest = mysql_query("update " . GIFIMAGES . " set yeahCount ='$yeahCount' where id = '" . $getLatestGif['id'] . "'");
$comment = mysql_query("select * from " . COMMENTS . " where gifid='" . $getLatestGif['id'] . "' order by id desc");
$getLatestUser = mysql_fetch_array(mysql_query("SELECT username,photo FROM " . TBL_USERS . " WHERE id='" . $getLatestGif['userId'] . "'"));
$commnetsCounts = mysql_num_rows($comment);
if ($counter % 4 == 1) {
$style = 'style="position: absolute; left: 0px; top: 175px;"';
} else if ($counter % 4 == 2) {
$style = 'style="position: absolute; left: 234px; top: 175px;"';
} else if ($counter % 4 == 3) {
$style='style="position: absolute; left: 468px; top: 175px;"';
} else {
$style='style="position: absolute; left: 702px; top: 175px;"';
}
$counter++;
?>
<div class="grid-splash-item" <?= $style ?>>
<!-- <img src="images/img-2.jpg" /> -->
<a href="<?php echo HTTP_ROOT . 'funny-' . $categoryName['name'] . '-images/' . makeSeoUrl($getLatestGif['title']) . '/' . $getLatestGif['uniq_id']; ?>" > <img width="198" height="169" src="<?php echo HTTP_ROOT . DIR_GIF . $getLatestGif['gifphoto']; ?>" /> </a>
<div class="gif-details">
<div class="gif-details-menu">
<span>
<div class="gif-details-menu-box" <?php if (!empty($_SESSION['USER_ID']) && $checkLatestUsers) { ?> <?php } else { ?> <?php } ?>>
//My coding present.I have removed it(too long).
</div>
</span>
<p><?php echo substr($getLatestGif['title'], 0, 20); ?></p>
</div>
</div>
</div>
After researching a lot,i came to a accurate result.Here its only need to change two things.Here i have not written any inline css,after appending its coming fine,with proper css.
Below is my new code.Which is working perfectly.
This is my new script coding.I have modified a little
<?php $per_page=20; $latestImages = mysql_query("select * from ".GIFIMAGES." WHERE isActive = '1' AND not_update='1' order by modified "); $total_record=mysql_num_rows($latestImages)/5;$maxPage=number_format((float) $total_record, 2, '.', ''); ?>
<script>
$(function(){
var $container = $('#container');
var lastX = 0;
var currentX = 0;
var page = 1;
$('#append a').click(function(){
if (page < '<?php echo $maxPage;?>') {
page++;
$('.funny-gifts').html('Loading...');
$.post("ajax_append.php", {'ajax_append':'<?php echo $per_page;?>','page':page},function(data)
{
// $('#container').append(data);
var $newItems = $(data);
$('#container').isotope( 'insert', $newItems );
$('.funny-gifts').html('More Funny Gifs');
});
} else {
$('.funny-gifts').hide();
}
});
});
</script>
***var $newItems = $(data);
$('#container').isotope( 'insert', $newItems );***
This above two line coding is very important for appending.
Dont use $('#container').append(data); for appending.Result will come but,having a designing issues.Then after it replace the view more button slightly.Below is coding.
<div id="append">More Funny Gifs</div>
I am newbie in PHP and AJAX, and I am in trouble and don't know how to solve it.
I am creating this page that shows a recordset that resulted from a query.
There are 2 pages: getdata.php and phpajax.php. phpajax.php calls getdata.php via Javascript.
What I have done:
I manage to make it work by using button "Try it" (using static value)
What I want:
How to display the data properly using "Submit" button on a single click (ATM the data appears for a couple of seconds after I click Submit twice, then disappears because the page suddenly refreshes) ?
How to pass the value of SELECT and TEXT into fshowdata() using the Submit Button ?
How to pass the value of SELECT and TEXT into fshowdata() using the "Try It" Button ?
Here is the for the phpajax.php:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<script>
function fshowdata(str1,date1) {
//alert("The form was submitted");
if (str == "") {
document.getElementById("txtHint").innerHTML = "";
return;
} else {
if (window.XMLHttpRequest) {
// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp = new XMLHttpRequest();
} else {
// code for IE6, IE5
xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
document.getElementById("txtHint").innerHTML = xmlhttp.responseText;
}
}
//document.getElementById("demo").innerHTML = str1 + " " + date1;
xmlhttp.open("GET","getdata.php?q="+str1+"&"+"t="+date1,true);
xmlhttp.send();
}
}
</script>
<style>
table {
width: 100%;
border-collapse: collapse;
}
table, td, th {
border: 1px solid black;
padding: 5px;
}
th {text-align: left;}
</style>
</head>
<body>
<p id="demo">Click the button to change the text in this paragraph.</p>
<?php
$con = mysql_connect('localhost','root','123');
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db('mydb')or die('Could not select database');
$sql="SELECT DISTINCT(rides) FROM t_trx ORDER BY rides ";
$result = mysql_query($sql) or die('Query failed: ' . mysql_error());
echo "<form onsubmit='"."fshowdata(`some rides`,`a date`)"."' action='".""."'>";
echo "Choose Rides : "." "."<select id='"."rides"."' name='"."rides"."'>";
echo "<option value='"."ALL"."'>ALL</option>";
while($row = mysql_fetch_array($result)) {
echo "<option value='".$row["rides"]."'>".$row["rides"]."</option>";
}
mysql_free_result($result);
echo "</select>";
mysql_close($con);
echo "<input id='"."date2"."' type='"."TEXT"."' name = '"."date2"."'>";
echo "<input id='"."button1"."' type='"."SUBMIT"."' value = '"."SUBMIT"."'>";
echo "</form>";
echo "<button onclick='"."fshowdata(`ROLLER COASTER`,`18/07/2015`)"."'>";
echo "Try it";
echo "</button>";
?>
<br>
<div id="txtHint"><b>Data will be shown here...</b></div>
</body>
</html>
And for the getdata.php:
<!DOCTYPE html>
<html>
<head>
<style>
table {
width: 100%;
border-collapse: collapse;
}
table, td, th {
border: 1px solid black;
padding: 5px;
}
th {text-align: left;}
</style>
</head>
<body>
<?php
$q = $_GET['q'];
echo $q;
$date_ = $_GET['t'];
echo $date_;
$con = mysql_connect('localhost','root','123');
if (!$con) {
die('Could not connect: ' . mysql_error());
}
mysql_select_db('mydb')or die('Could not select database');
$sql="SELECT * FROM t_trx WHERE rides = '".$q."' AND date1 = '".$date_."' LIMIT 10";
echo $sql;
$result = mysql_query($sql) or die('Query failed: ' . mysql_error());
echo "<table>
<tr>
<th>Rides</th>
<th>Number</th>
<th>Date</th>
</tr>";
while($row = mysql_fetch_array($result)) {
echo "<tr>";
echo "<td>" . $row['Rides'] . "</td>";
echo "<td>" . $row['Number'] . "</td>";
echo "<td>" . $row['Date'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?>
</body>
</html>
Thanks guys. I appreciate your help...
use below code to skip refresh page
onsubmit="return fshowdata(`some rides`,`a date`)"
in the fshowdata function, you should return false.
I have a blog system where I use a form to create a blog post. Here's what the form looks like: http://prntscr.com/7wupnn (As you can see, I've made a bit bold and changed the colour).
Here's the source of that form:
<?php
session_start();
include('db_connect.php');
if(!isset($_SESSION['user_id'])){
header('Location: login.php');
exit();
}
if(isset($_POST['submit'])){
$title = $_POST['title'];
$body = $_POST['body'];
$category = $_POST['category'];
$title = $db->real_escape_string($title);
$body = $db->real_escape_string($body);
$user_id = $_SESSION['user_id'];
$date = date('Y-m-d G:i:s');
$body = htmlentities($body);
if($title && $body && $category){
$query = $db->query("INSERT INTO posts (user_id, title, body, category_id, posted) VALUES('$user_id', '$title', '$body', '$category', '$date')");
if($query){
echo '<div style="position:absolute; bottom: 40px; left: 500px; padding: 10px; background: red; box-shadow: 0px 3px 12px 2px #000; color: #fff;">Post Added</div>';
}else{
echo '<div style="position:absolute; bottom: 40px; left: 500px; padding: 10px; background: red; box-shadow: 0px 3px 12px 2px #000; color: #fff;">An unexpected error has occured.</div>';
}
}else{
echo '<div style="position:absolute; bottom: 40px; left: 500px; padding: 10px; background: red; box-shadow: 0px 3px 12px 2px #000; color: #fff;">Please enter all the required information to proceed</div>';
}
}
?>
<div id="mainbox">
<form action="<?php echo $_SERVER['PHP_SELF']?>" method="post" enctype="multipart/form-data">
<input type="text" name="title" placeholder="Enter Post Title Here">
<p></p>
<textarea name="body" id="mytextarea" cols=50 rows=10 placeholder="Enter Post Content Here"></textarea>
<script>
CKEDITOR.replace( 'mytextarea' );
</script>
<p></p>
<input type="file" name="upfile">
<select name="category">
<?php
$query = $db->query("SELECT * FROM categories");
while($row = $query->fetch_object()){
echo "<option value='".$row->category_id."'>".$row->category."</option>";
}
?>
</select>
<p></p>
<input type="submit" name="submit" value="Submit">
</form>
</div>
When I click submit, the post is then published onto the blog page - however it's lost all it's style - here's what I mean: http://prntscr.com/7wuq9f - as you can see, the browser is displaying the HTML rather than using it.
Here's the code for he blog page:
<?php
include('blog/db_connect.php');
$record_count = $db->query("SELECT * FROM posts");
$per_page = 2;
$pages = ceil($record_count->num_rows/$per_page);
if(isset($_GET['p']) && is_numeric($_GET['p'])){
$page = $_GET['p'];
}else{
$page = 1;
}
if($page<=0)
$start = 0;
else
$start = $page * $per_page - $per_page;
$prev = $page - 1;
$next = $page + 1;
$query = $db->prepare("SELECT post_id, title, LEFT(body, 100) AS body, category FROM posts INNER JOIN categories ON categories.category_id=posts.category_id order by post_id desc limit $start, $per_page");
$query->execute();
$query->bind_result($post_id, $title, $body, $category);
?>
<div id="mainbox">
<?php
while($query->fetch()):
$html_body = nl2br($body);
$lastspace = strrpos($html_body, ' ');
?>
<h2><?php echo $title?></h2>
<p><?php echo substr($html_body, 0, $lastspace)."<a href='blog/post.php?id=$post_id'>..</a>"?></p>
<p>Category: <?php echo $category?>
<hr />
<p></p>
<?php endwhile?>
<?php
if($prev > 0){
echo "<a href='blog.php?p=$prev'>Previous Page</a>";
}
if($page < $pages){
echo "<a href='blog.php?p=$next'>Next Page</a>";
}
?>
Instructions on how to keep the style of the text when publishing it would be appreciated.
on this page , at the bottom , I left with the part of the securities and the right side dovre you should open a player , you should open the video corresponding to the title clicked .
Now I can take the path of the video to the title of the db clicked , so :
<div id="down">
<div id="downSx">
<?php
ob_start();
$host = "**";
$username2 = "**"; // Mysql username
$password = "**"; // Mysql password
$db_name = "**"; // Database name
//connect to db
mysql_connect($host, $username2, $password) or die("cannot connect");
mysql_select_db($db_name) or die("cannot select DB");
$i=0;
$h=0;
$result = mysql_query("SELECT * FROM videoMultimedia ");
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
?>
<div class="titleSxDown">
<a class="preset_text" id="<? echo $h++ ?>"><? echo $row[3] ?></a>
</div>
<?
}
$result = mysql_query("SELECT * FROM videoMultimedia ");
while ($row = mysql_fetch_array($result, MYSQL_NUM)) {
?>
<input type="hidden" value="
<? if($row[1] != ""){
echo $row[1];
}else{
echo $row[2];
}
?>
" id="link_content_<? echo $i++ ?>" />
<?
}
mysql_free_result($result);
ob_end_flush();
?>
</div>
<div id="downDx">
<div class="descrizioneDxDown">
</div>
</div>
<script type="text/javascript">
$(document).ready(function() {
$('.preset_text').click(function() {
var target = $(this).attr("id");
$('.descrizioneDxDown').html($('#link_content_' + target).val());
});
});
</script>
I can not but ' to enter the path in this script ( the script is the player ( JPlayer ) ) :
<script type='text/javascript'>
jwplayer('descrizioneDxDown').setup({
file: 'pathVideo',
image: 'pathIMG',
title: 'TITLE',
width: '100%',
aspectratio: '16:9'
});
</script>
This is the URL of my site: http://www.fifaitaly.altervista.org/index.php
How can I do , help thanks !
jsplayer takes the id ..you are giving class
change the class to id:
<div id="descrizioneDxDown"> // you are not doing this
</div>
Now you have to build a playlist and put it:
<script>
jwplayer("descrizioneDxDown").setup({
playlist: "/path_to_your_Playlist.rss",
width: 720,
height: 270,
listbar: {
position: "right",
size: 240
}
});
</script>
Found Here