View Full Version : !!! i need you guys, please help !!!

06-17-2009, 08:36 PM
guys, really need your help, my english is bad so please try to understand and help, i am making website, every thing is great i even learned php and sql, But i made input info validation in javascript, and i have a lot of same pages, i know in php i can use include("***.php"); and echo sprintf("%'09s", $***); to launch a php code from other file, can i do it in javascript and how? i want to save my javascript function in html or php file and call it in other php aplications, is it possible?

06-17-2009, 09:18 PM
This would be better placed up in the main javascript forum.

To "include" javascript in other pages, just put your common code in a separate file and use script tags in the head section, like this:

<script type="text/javascript" src="/path/to/the/script.js"></script>

06-18-2009, 02:32 PM
Some one didn't read the "read this first before post" thread.