codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  How do I access a db to populate a dropdown menu based on a field in a form?  Archive Import (moonflower) at 09:22 on Monday, May 19, 2003
 

I cannot find any information on how to access a database in javascript. I have a form field of offices. Depending on what office they pick I have another drop-down that will populate with the members of that office.
How do I do this? I know it is an onchange event, but beyond that I don`t know.
Thanks
moon

  Re: How do I access a db to populate a dropdown menu based on a field in a form?  Archive Import (zonan) at 01:00 on Thursday, May 29, 2003
 

i`m not sure about db connection in javascript but to create another drop-down depending on the first drop-down,try your luck here
url:http://www.trans4mind.com/personal_development/JavaScript/

  Re: How do I access a db to populate a dropdown menu based on a field in a form?  Archive Import (Anubhuti) at 09:55 on Monday, August 18, 2003
 

u can create a bean and access its values from your page...something like this....

<bean:define id ="EOR" name = "FormBean" property="EOR" />
<select>
<option value=`All` selected = `true`>All</option>
<%
try{
options = (String[][])EOR;
val= java.lang.Integer.valueOf(options[0][0]).intValue();
if(val>0){
for(i = 1; i<=val; i++)
{out.print("<option value=`" +options[0] + "`>" + options + "</option>");}}}
catch(Exception e){System.out.println("Error in EOR in Query.jsp--->"+e);}
%>
</select>








CodeToad Experts

Can't find the answer?
Our Site experts are answering questions for free in the CodeToad forums








Recent Forum Threads
•  Re: C++ Beginner question
•  Re: function within loop problem
•  moncler outlet
•  Re: Display swf file in pdf
•  Re: how to create forum using asp.net with c# language?
•  Discount coach store
•  Create Better Maps with Global Mapper
•  Re: How to display a message box when record is temporary stored in session/grid view
•  Sharing object in perl


Recent Articles
ASP GetTempName
Decode and Encode UTF-8
ASP GetFile
ASP FolderExists
ASP FileExists
ASP OpenTextFile
ASP FilesystemObject
ASP CreateFolder
ASP CreateTextFile
Javascript Get Selected Text


© Copyright codetoad.com 2001-2012