dcsimg
Access database from javascript
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Kurian_John
Posted On:   Sunday, March 17, 2002 12:42 AM

I want to access databse from a javascript method. Some data should be loaded as result of a radiobutton selection. I don't want to refresh the page by calling a jsp with parameters. I've solved my problem with refreshing the jsp page. But I want a quick change in data without calling jsp. Thank you in advance

Re: Access database from javascript

Posted By:   Firat_Tiryaki  
Posted On:   Sunday, March 17, 2002 11:59 PM

You should create a javascript array with jsp like below




out.println("MyArray=new Array(");
while (/*fetching the database rows*/)
out.println("'your array value here',");
out.println(");");


now you have the array
MyArray=new Array("bla 1","bla 2",...,"bla n");

use this array of database data with javascript

About | Sitemap | Contact