where to place JavaScript
-
Hello All, I am New to php :) I wanted to modularize my pages nicely.. Found a method to divide the page into different php file and include them in the main page.. Is it a good method? . . If so, I am not getting where to put my java-script code. . Usually I put them in the header of the page or a different file and set up the link in the header... But now, if I want to call a method from a subdivided php file, do I have to write the method in the same file, or I can put all the method in the main page, just like usual? Please feel free to point me out if I am lacking some other basic concept :) thanks Hrishi
-
Hello All, I am New to php :) I wanted to modularize my pages nicely.. Found a method to divide the page into different php file and include them in the main page.. Is it a good method? . . If so, I am not getting where to put my java-script code. . Usually I put them in the header of the page or a different file and set up the link in the header... But now, if I want to call a method from a subdivided php file, do I have to write the method in the same file, or I can put all the method in the main page, just like usual? Please feel free to point me out if I am lacking some other basic concept :) thanks Hrishi
AFAIK, if you're using Microsoft IIS you can add php interpreter, and that way you can mix php, jscript and vbscript. With full access to functions/variables in either. (within the same ASP file) Access to functions located in other files can be achieved with *includes* directives, which load the external file into the current web server code.
Q. Hey man! have you sorted out the finite soup machine? A. Why yes, it's celery or tomato.