Click here to Skip to main content
14,981,116 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Dear Friends,

I am calling javascript function on set of time interval.
I want to execute a query when ever the function is called.
Is it possible to execute the query in javascript. If Yes, please guide me on that.

Arunprasath Natarajan 13-Jun-12 7:55am
function call_fun()
Load_DaTa.Open " Select no=newid()", con, 3, 3
alert("Hello New ID found - "+Str);
But it loads the data only once not dynamically

1 solution

Is it possible to execute the query in javascript.
No. Not possible. Query can only run on server.

Thus, if you want to run a query on server you need to talk to server via Javascript.

There are few ways to interact with server side through client side(Javascript):
1. XMLHttpRequest[^]
2. Callback[^]
3. WebService call[^]
4. PageMethod[^]

Pick the one that suits you.
VJ Reddy 13-Jun-12 10:52am
Good references. 5!
Sandeep Mewara 13-Jun-12 11:23am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900