DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  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, 05:18 PM
  2. JavaScript function within XSL
    By Igor in forum XML
    Replies: 1
    Last Post: 01-08-2002, 02:48 PM
  3. Getting a GUI to function
    By Eric in forum Java
    Replies: 1
    Last Post: 11-27-2001, 06:53 AM
  4. Re: Password field read by javascript
    By Edison in forum Java
    Replies: 0
    Last Post: 03-12-2001, 10: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

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


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links