nuwandias Posted September 17, 2007 Share Posted September 17, 2007 Hi Guys.. Have you ever encountered any issues with javascript when they are written within php files..? Because i have been getting ridiculous errors when i run Javascript code within my php files. One of those issues is that javascript does not recognize the submit function of a form object. It gives an error message saying that the submit function is neither a property or method in the form object. If there is anyone who knows why these kind of error occur, please be kind enough to reply soon.Thanks in advance,Nuwan Link to comment Share on other sites More sharing options...
justsomeguy Posted September 17, 2007 Share Posted September 17, 2007 Javascript and PHP don't have anything to do with each other, they don't see each other or share anything and don't get executed at the same time. Post your code if you want someone to take a look at it. Link to comment Share on other sites More sharing options...
zppblood Posted September 18, 2007 Share Posted September 18, 2007 Listen to justsomeguy on this. PHP is server-side, and JavaScript is client-side. You will output JavaScript as if you were going to output HTML. Link to comment Share on other sites More sharing options...
nuwandias Posted September 20, 2007 Author Share Posted September 20, 2007 yes guys.... i don't know exactly what was wrong...but it started working all of a sudden.I just cut and pasted the javascript stuff on the page and started working. Anyway, thanks for all your help.Regards,Nuwan Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.