[Javascript] how to get values from database using javascript

Mike Dougherty mdougherty at pbp.com
Fri Aug 19 08:19:06 CDT 2005


Is there a reason to not use server-side code to build this menu?  Typically, the data is 
retrieved from the database by the webserver when the page is constructed - all the data for the 
menu is then delivered with the page.

The security issues involved with having multiple client-side javascripts accessing the database 
for menu items, along with the complexity of instantiating client-side ADO connections - makes 
this prospect less than ideal.  It CAN be done - our intranet has apps that make ADO connections 
from the browser directly to the database.  It's not a public system.  It doesn't scale well even 
across our WAN.  It runs only on PC (using ActiveX/COM ADO object) - there are so many caveats, 
that I would not want to attempt this for a large university or public website.

You might consider XMLHTTP (see AJAX) for enabling the retrieval of content without a page 
refresh.  Keep in mind that without javascript enabled, your menu will also be unusable 
(navigation is fairly important to the life of a site)  I regret having used this strategy on 
PGIProducts.com, as it is complete overkill to render an N-level tree style menu for a site that 
never uses more than two levels.  Check it out though, it's at least interesting academically. 
 Let me know if you want any more info on this technique...

On Thu, 18 Aug 2005 23:00:42 -0700 (PDT)
  Jai Sankar N <pnjaisan at yahoo.com> wrote:
> Hi ...everybody,
> 
> i'm developing dynamic website for deemed university. i have left side frame with menu. i would 
>like to get values (like as facilities, activities, authorities, board of studies....) from 
>database and put in sub menu of corresponding clicked menu.
> 
> at present i have static menu it working as fine.
> 
> i want to make dynamic menu...
> 
> pls. help me ..
> 
> thanks for advance.
> 
> N.Jai Sankar
> India.
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 
> 
> __________________________________________________________
> This message was scanned by ATX
> 2:00:56 AM ET - 8/19/2005




More information about the Javascript mailing list