elo bro, dah fix ke?
kalau aku paham your problem correctly, try bende ni, kalau salah aku punya assumption, sori.
banyak data ke? kalau data tu tak banyak try set marquee height jadik pendek sket. atau kasi data jadik beribu ribu (lemon) line ke. marquee cuma jadik kalau bende kat dalam tag tu dah overflow
Quote:
Originally Posted by tenuk
heres an update on what i got and what i actually im trying to do. the issue is almost solved so i think its polite to post my findings here.
what im trying to do:
a widget like thing (like most remotely-hosted shoutbox for blogs). which display a marquee of an rss feed(using magpie).
ppl can include it like adsense code (for color and size)
what i know so far: - php script will always be processed first.
- theres no way to convert javascript variable to php's(xcept _POST)
- php can write javascript like "echoing" normal html.
how i settle things: - design(color and size) variable in javascript
- php variable i use _GET url
My code:
Code:
<?php
foreach ($rss->items as $item) {
$href = $item['link'];
$title = $item['title'];
$desc = $item['description'];
$desc = $desc . "..... <br/><a href=$href style=\"text-decoration: none; color: #000000;\">-MORE-</a>";
echo "
";
echo "document.write('<p style=";
echo "\\\"font-family: Arial; font-size: x-small; margin: 5px; text-decoration: none; background-color: #CCCCCC; text-align: center;";
echo "\\\"><a href=$href style=";
echo "\\\"text-decoration: none; color: #000000;";
echo "\\\">$title</a></p>";
echo "');";
echo "
";
echo "document.write('<p style=";
echo "\\\"font-family: Arial; font-size: x-small; margin: 5px; text-align: justify;";
echo "\\\">$desc<p>";
echo "');";
}
?>
but new problem rise.. (sigh) the marquee dont work. it works when i open <script bla bla> and close it in file2.php. but it doesnt work when i call it in file1.html
by not working i mean the marquee only; the php data shows fine.
Code:
document.write('<marquee behavior=\"scroll\" direction=\"up\" height=\"240\" scrollamount=\"1\" scrolldelay=\"80\" truespeed=\"true\" onmouseover=\"this.stop()\" onmouseout=\"this.start()\">');
###<? the above php script here ?>###
document.write('</marquee>');
p/s: well at least i got most of the hard part working right?
|