jwk811 Posted November 6, 2006 Share Posted November 6, 2006 could you? or could you include a function or file of php? or no? Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted November 6, 2006 Share Posted November 6, 2006 you can use php to develop js or you can use ajax for js to execute some php code on the fly. Quote Link to comment Share on other sites More sharing options...
btherl Posted November 6, 2006 Share Posted November 6, 2006 If you want to generate javascript using php, then yes you can. Just set your script tag to point to the php script, and have your php script output javascript.But there is no way to "include" a php file from plain javascript. Like Toon said, you can use ajax to call a php script from javascript and get the results. Quote Link to comment Share on other sites More sharing options...
jwk811 Posted November 8, 2006 Author Share Posted November 8, 2006 ok say i want to check a form to see if there is input in each place.. id put onSubmit="check.js" and in the check .js file i can have php in it? and how could i get it to out put an alert if there was no input? could you please give me something to look at? thank you Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.