|
||||
javascript + php
im not talking about ajax
heres my situation. [file1.html][static html] Quote:
Quote:
1.How do I print a result from a (php) function in file2.php so that its is shown in file1.html 2.How do I convert the variable to a php variable. should i use <? echo "print.document(\"$variable\")"; ?> or print.document(" <? echo $variable ?>");
__________________
My Blog: http://kay.cesb.net.my |
|
||||
Well if you are connecting to an external javascript file then both inline and externel are in javascript. Don't be confuse with the .php extension because you are including it as a javascript file not as a php. The no other way to include a php file and run php except using include() or require().
__________________
ChronoSight |
|
||||
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:
how i settle things:
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 "');";
}
?>
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>');
__________________
My Blog: http://kay.cesb.net.my |
![]() |
«
Previous Thread
|
Next Thread
»
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| HTML & JavaScript | marcoenie | Website Design | 8 | 15-02-2006 12:03 PM |
| import javascript | honeyz | Website Design | 1 | 27-09-2005 10:09 AM |
| Javascript for right clicking? | blu3m0on | Website Design | 11 | 01-11-2003 10:49 PM |
| javascript question | kelly001 | Website Design | 0 | 22-07-2003 01:20 AM |
| Just some questions about Javascript | ngaisteve1 | Website Design | 1 | 13-02-2003 04:08 PM |
All times are GMT +8. The time now is 09:20 AM.
Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO 3.1.0 vBulletin skin by ForumMonkeys.com.













Linear Mode

