www.webdeveloper.com
Results 1 to 4 of 4

Thread: SQL in Javascript

  1. #1
    Join Date
    Sep 2005
    Posts
    2

    SQL in Javascript

    hello,

    Can SQL commands be executed on a database like oracle and return the value to Javascript..
    I s there any possibilty of using Javascript like that??

  2. #2
    Join Date
    May 2005
    Posts
    230
    Best way to access your database is using server-side language. You can then pass the results to your javascript code either via html object, or through writing the variable assignment directly to the page (response.write in ASP).

  3. #3
    Join Date
    Dec 2002
    Location
    Calgary, Canada
    Posts
    6,123
    Straight answer to your question is "No", you can not do that using JavaScript...this process has to take care of on the server side.
    Cheers

    Khalid

    Message Posting Guidelines In These Forums, Please read these before posting any question.
    Web site: webapplikations.com
    Web Resources Page:Web Resources

  4. #4
    Join Date
    Mar 2005
    Location
    Sydney, Australia
    Posts
    7,974
    If you need the info in Javascript to process it then you will need to set up your Javascript to be parsed on the server to do server side substitutions via your chosen server side language before the script is downloaded to the browser. You can force this for external javascripts by changing the file extension eg:

    <script type="text/javascript" src="myscript.php"></script>

    myscript.php would be a combination of Javascript and PHP where the PHP substitutes into the Javascript prior to downloading.
    Stephen

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles