Can I open a connection in Javascript

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • vikas251074
    New Member
    • Dec 2007
    • 198

    Can I open a connection in Javascript

    My part of form programe where javascript function is called is -
    Code:
      <tr>
        <td align="right" style="width:125px ">VLAN Name :</td>
        <td align="left"><input type="text" style="width:250px " name="vlan_name" id="vlan_name" onkeyup="capital(this);"/></td>
      </tr>
      <tr>
        <td align="right" style="width:125px ">VLAN First IP :</td>
        <td align="left"><input type="text" style="width:100px " name="first_ip" id="first_ip" onchange="firstip(this);"/></td>
       </tr>
    Description of Javascript function is as follows -
    Code:
    function capital(temp){
      var str = temp.value;
      document.getElementById(temp.id).value = str.toUpperCase(); 
    }
    Can I use Javascript method in this function capital(temp) to check if the this value exist in oracle table?

    Thanks and regards
    Vikas
  • gits
    Recognized Expert Moderator Expert
    • May 2007
    • 5390

    #2
    you could make an AJAX-request that transfers the value to a serverside script that requests the database and send a response to the browser that you could process. JavaScript cannot do connect directly, but you may trigger a serverside action in the background without a page-reload with AJAX (XMLHttpRequest ) ...

    kind regards

    Comment

    • vikas251074
      New Member
      • Dec 2007
      • 198

      #3
      Thanks for information
      I am new to AJAX. I don't know anything about AJAX. Can u provide me code for opening database connection so that I can start learning. Or simply can u write the code for validation of entered data in text in AJAX scripts.

      My main job is to verify the entered vlan_name from oracle database. How can I do this using AJAX scripts? If u provide me with code, then I will be able to start learning easily.

      Thanks and regards,
      Vikas

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Asking for code is nearly the last thing you should be doing here.
        All you need to do is go through an AJAX tutorial, try the code and post again if you still have problems.

        Comment

        Working...