DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Passing field name from form to javascript function

  1. #1
    Join Date
    Feb 2005
    Posts
    11

    Passing field name from form to javascript function

    I have a form that will have multiple textboxes in it...lets call them txtBox1, txtBox2, and txtBox3. I want to write a function that fires when I leave the field. First question, what will be the code for the textbox? onExit="SaveRecord()" or something like that? (meaning the onExit portion)

    Second question. On that function, SaveRecord(), I wish to pass the name of the textbox that it is currently in. Would I pass that in the SaveRecord(datahere) portion or would I find it in the function? Form name will be frmGeneral.

    Based upon that data, i am going to write a select case statement and do an ajax update on the exit feature of the textbox...any help is much appreciated!

  2. #2
    Join Date
    Feb 2005
    Posts
    11
    Can I just pass a static value across? That would work for me

    onExit="SaveRecord(txtBox1)"

    Then my select case statement would do the rest...but isn't txtBox1 considered a variable?

Similar Threads

  1. Search System Tray
    By MyPlague in forum .NET
    Replies: 2
    Last Post: 03-20-2006, 06:18 PM
  2. JavaScript function within XSL
    By Igor in forum XML
    Replies: 1
    Last Post: 01-08-2002, 03:48 PM
  3. Getting a GUI to function
    By Eric in forum Java
    Replies: 1
    Last Post: 11-27-2001, 07:53 AM
  4. Re: Password field read by javascript
    By Edison in forum Java
    Replies: 0
    Last Post: 03-12-2001, 11:30 PM
  5. How do I detect an FTP timeout?
    By Julian Milano in forum VB Classic
    Replies: 0
    Last Post: 08-10-2000, 09:16 PM

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
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center