SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    KickMe
    SitePoint Community Guest

    the try-catch statement

    "How to do everyything with javascript" .
    The try-catch statement is compatible for error logs ???
    Got any idea about how the following example is working ?
    try { open_database() ; }
    catch (err) {
    alert("Err " ) ; } , with what i can use it ? How many biuld in functions has javascript ? And ...
    What database is compatible with javascript ?
    And many more questions

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    How many biuld in functions has javascript
    113.

    Got any idea about how the following example is working ?
    try { open_database() ; }
    catch (err) {
    alert("Err " ) ; } ,
    Yep.
    With what i can use it ?
    Any script where you want to alert the string "Err" when an error occurs while the fuction open_database() is executing. As with most programming, your imagination is the limit.

    What database is compatible with javascript ?
    None. All of them. javascript executes in a browser on the client side of a client-server relationship. In addition, js is restricted to operating within the browser. Therefore there are no databases on the client side of a server-client relationship that js can access.
    Last edited by 7stud; Jan 22, 2007 at 23:15.

  3. #3
    KickMe
    SitePoint Community Guest

    Thank you , useful information , can you suggest a book?
    Therefore there are no databases on the client side of a server-client relationship that js can access.
    I want to check for shure ...
    Last edited by KickMe; Jan 22, 2007 at 20:12.

  4. #4
    SitePoint Wizard
    Join Date
    Mar 2001
    Posts
    3,537
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    can you suggest a book?
    Javascript: A Beginner's Guide
    Javascript: The Definitive Guide (5th ed--just came out)

  5. #5
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,810
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    Javascript has no file access whatsoever except for cookies.

    JScript (the IE equivalent) can be configured to read and write local files on an intranet.

    To be able to read and write to files or databases on the server you need to use Javascript to generate an XMLHttpRequest to a server side process thhat will do the file or database lookup and return the result back to the javascript. For more info on how to do this just search for "Ajax" in your favourite search engine.
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">


Bookmarks

Posting Permissions

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