Current location: Hot Scripts Forums » General Web Coding » JavaScript » textbox to text box value


textbox to text box value

Reply
  #1 (permalink)  
Old 05-28-04, 03:32 AM
Omega2 Omega2 is offline
Newbie Coder
 
Join Date: May 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Question textbox to text box value

hello ppl

I Really need some help with this

I have got an SouthAfricanIDNumber textbox and a year textbox And both of the fields are numerical, well what I want is this:

IDNumber 7905045001082
YearBorn 1979

so all it needs to do is on an onblur function on the IDNumber textbox it needs to grab the first two numbers and insert it in the Yearborn textbox together with 19 in front of the value

Thanks any help will be appreciated

Omega2
Reply With Quote
  #2 (permalink)  
Old 05-28-04, 02:02 PM
TwoD TwoD is offline
Community VIP
 
Join Date: Sep 2003
Location: 404
Posts: 1,813
Thanks: 0
Thanked 0 Times in 0 Posts
onBlur="document.getElementById('YearBorn').value= '19'+this.value.substr(0,2)"
^
Should do that I think
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
generate text boxes from value in a text box on previous page Omega2 ASP 1 05-25-04 07:25 AM
text box altafingar Visual Basic 2 05-08-04 10:20 PM
Visual basic text box altafingar Visual Basic 2 04-30-04 08:49 AM
MySQL Query problem Wraith PHP 5 03-06-04 05:16 PM
picking random entries with a filter... Double selection problem dsumpter PHP 7 11-16-03 07:19 PM


All times are GMT -5. The time now is 02:21 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.