View Single Post
  #4 (permalink)  
Old 11-12-2006, 09:32 AM
phantomic's Avatar
phantomic phantomic is offline
Novice Webmaster
 
Join Date: Jan 2003
Location: KL
Posts: 91
Rep Power: 72
phantomic is on a distinguished road
Send a message via AIM to phantomic Send a message via MSN to phantomic Send a message via Yahoo to phantomic Send a message via Skype™ to phantomic
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 View Post
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:
  1. php script will always be processed first.
  2. theres no way to convert javascript variable to php's(xcept _POST)
  3. php can write javascript like "echoing" normal html.

how i settle things:
  1. design(color and size) variable in javascript
  2. 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?
Reply With Quote