Executing Javascript code stored in a database.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • makthar
    New Member
    • Aug 2007
    • 13

    Executing Javascript code stored in a database.

    Hi

    I have a database table that contains alert statements, each having a unique id. I have a javascript function that makes a call to the database taking in the unique id as parameter .
    for ex [HTML]var stmt = callDbase(12345 ); [/HTML] . The function returns the alert statement, I am able to retrieve the alert statement from dbase, now i need to execute the variable stmt that holds the alert statement in my javascript.

    I am not able to that.


    Plz give me any suggestions regarding this ASAP as it is urgent.

    Thanks
    Mansoor.
  • epots9
    Recognized Expert Top Contributor
    • May 2007
    • 1352

    #2
    are you using javascript alone to connect to the database? if you are, it will not work; javascript can't connect to a database unless you are using ajax.

    if you are using ajax, please post your code that you are having trouble with.

    Comment

    • pbmods
      Recognized Expert Expert
      • Apr 2007
      • 5821

      #3
      Changed thread title to better describe the problem.

      Comment

      Working...