By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,928 Members | 1,590 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,928 IT Pros & Developers. It's quick & easy.

Can I open a connection in Javascript

vikas251074
100+
P: 198
My part of form programe where javascript function is called is -
Expand|Select|Wrap|Line Numbers
  1.   <tr>
  2.     <td align="right" style="width:125px ">VLAN Name :</td>
  3.     <td align="left"><input type="text" style="width:250px " name="vlan_name" id="vlan_name" onkeyup="capital(this);"/></td>
  4.   </tr>
  5.   <tr>
  6.     <td align="right" style="width:125px ">VLAN First IP :</td>
  7.     <td align="left"><input type="text" style="width:100px " name="first_ip" id="first_ip" onchange="firstip(this);"/></td>
  8.    </tr>
Description of Javascript function is as follows -
Expand|Select|Wrap|Line Numbers
  1. function capital(temp){
  2.   var str = temp.value;
  3.   document.getElementById(temp.id).value = str.toUpperCase(); 
  4. }
Can I use Javascript method in this function capital(temp) to check if the this value exist in oracle table?

Thanks and regards
Vikas
Jun 10 '08 #1
Share this Question
Share on Google+
3 Replies


gits
Expert Mod 5K+
P: 5,390
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
Jun 10 '08 #2

vikas251074
100+
P: 198
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
Jun 10 '08 #3

10K+
P: 13,264
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.
Jun 10 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.