JS doesn't work with my PHP file
Posted: Sat Dec 09, 2006 1:53 pm
feyd | Please use
It refuses to fire, did I miss some important point or should I just recheck my code?
Additionally, is there a special php command for conetcting the php file to a js file or should I just add "<script src=…></script>"?
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I wrote a simple js function:Code: Select all
echo "<script type=\"text/javascript\">";
echo "function alertBtn()";
echo"{alert(document.getElementById(\"btn\").id)}";
echo "</script>";Additionally, is there a special php command for conetcting the php file to a js file or should I just add "<script src=…></script>"?
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]