I am not sure if that can be achieved in gedit, but there are several alternatives for this case, such as:
Bluefish at http://bluefish.openoffice.nl/index.html which is imho the most lightweight and will give you the reference information in autocompletion popup asn shown in the Edit Preferences of the Bluefish.
Give it a try, it isn't that different or resources demanding than gedit.
A php file highlighted and html reference information in a popup.

An html file highlighted and html reference information in a popup.

Edit/Preferences Language support config.

Supported languages, which includes but not limits to Javascript
