Tag Archives: php

This is what we call external javascript too..

Anyway save your .js file as .php. For example, your js file will be named as file.php

The syntax to referencing a PHP file using external JavaScript is almost same as what we normally do for JS files:

<script type=”text/javascript” src=”file.php”></script>

where “file.php” is either an absolute or relative path to a PHP script instead of the usual .js file. Paramenters can also be passed to the PHP file by using the URL string:

<script type=”text/javascript” src=”file.php?id=3&name=hmmmsup”></script>

PHP Script can get these parameters using the global variable $_GET. I know, you may be wondering whats the catch here? Hmmm, actually there is no catch involved here, just some limitations. Since the PHP script is being invoked indirectly and via JavaScript, the final output of the PHP script should be a valid JavaScript. It can be considered as a dynamic .js file!

In the normal PHP script called inside a PHP page, the output is a raw HTML data and the source code can be modified using the script, but thats not the case with JavaScript invoked version though…Anyway there are loads of things which can be done using this!

ps: it had been a long day!

hmmm…eclipse is an amazing ide and there are thousands of well documented plugins available on internet to make the development process much more simpler for developers.

Well it just helps to make your task easy, simple and fast. A few things which can be done using these plugins for eclipse are HTML,XML and XHTML documents validation; editor for JavaScript, CSS, JSP and XML; perl, python and php project development; manage servelets and tomcat from eclipse only ; database management; seperate ide for JS, struts and java server faces; debug your project; manage SVN repositories; track bugs; and lot more…!

the installation process is a piece of cake for everyone.. its really simple.. just a few clicks and its done!

Make sure you have the following packages installed on your system. These are a must for development and running the eclipse client.(just in case)

  1. eclipse-ecj
  2. eclipse-jdt
  3. eclipse-jdt-sdk
  4. eclipse-pde
  5. eclipse-pde-sdk
  6. eclipse-platform
  7. eclipse-platform-sdk
  8. eclipse-rcp
  9. eclipse-rcp-sdk
  10. libgcj-src

Install the required plugins from whichever website you want to install..i have used easyeclipse here.. its a plugin for php development. Install it from here.

We used the following plugins as far as i remember

  • Eclipse html tidy
  • Amateras Html and Xml Editor
  • Ecllipse perl integration
  • Php Eclipse
  • Pydev
  • QuantumDB
  • Amateras IDE
  • SubEclipse (for managing SVN repositories) and others

The documentation about these plugins can be found here.
Download them in a folder on your machine. Separate the features and plugins in two folders, name them features and plugins respectively inside the main eclipse folder.

The features will have a “features.xml” file inside the folders.

After separating them launch eclipse on your machine to install the plugins.

Now goto help on the top menu bar then software updates and then manage configuration

Help –> Software Updates –> Manage configuration

On the left pane,there will be two default entries of /usr/share/eclipse and /usr/lib/eclipse. Right click there and click on “Add an Extension Location“. Now give the path to the main eclipse plugin folder “eclipse” (which contains two folders – features and plugins).

Now close the window and restart eclipse. Thats it.. your plugins have been installed! Yenjoy! :)

ps: whats so good about today!