dkirk
03-11-2008, 09:19 PM
I have a simple peice of javascript that resides in an aspx page that calls a function:
<script language="JavaScript" type="text/javascript">woodIsLife();</script>
I would like to store the name of the function in a sql database and then populate the javascript with the function name depending on search criteria. Is there a way to pass the query results to the javascript? something like this (in the example, functionName would be the name of the column from the db. there would only be one result):
<script language="JavaScript" type="text/javascript"><% Eval("functionName") %>script>
<script language="JavaScript" type="text/javascript">woodIsLife();</script>
I would like to store the name of the function in a sql database and then populate the javascript with the function name depending on search criteria. Is there a way to pass the query results to the javascript? something like this (in the example, functionName would be the name of the column from the db. there would only be one result):
<script language="JavaScript" type="text/javascript"><% Eval("functionName") %>script>