Developer's Guide :: Javascript Language

From Delphi for PHP Documentation Wiki

Jump to: navigation, search

It is necessary to use JavaScript to:

  • Exploit all features of the VCL components
  • Enable interactivity without communicating with the web server

This is possible because JavaScript can access all the components on your webpages as objects, having properties and events.

In Javascript, properties, methods and events for components, usually differ from the VCL for PHP ones, for example, while you can use Caption to change the text to be shown on a Label, if you want to modify it from Javascript, you need to use innerHTML javascript property:

 
        lbl=findObj('Label1');
        lbl.innerHTML='test';
 

Also, you can use findObj instead getElementById, because it's cross-platform and is able to search for an element on frames and qwidgets.

This page contains links to places where you can find good documentation on the JavaScript language:

More info on JavaScript:

Personal tools
In other languages