Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Feb 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question [OOP-noob] Process numbered fields by id-number ? (also posted in DOM)

    Hi all,

    beeing a compleet newb to OOP, I could probably use (a lot of) help with the following:

    Have a form with a couple of lines of dates (date1, date2, date3, etc.)
    Each date-field gets filled by 3 drop-downs (day1/mnth1/yr1, day2/mnth2/yr2, etc.)

    My question is, can I now do this ?

    Code:
    //javascript
    function DatumZetten(id)
    	{
    	var day = this.document.form.day[id].value;
    	var month = this.document.form.mnth[id].value;
    	var year = this.document.form.yr[id].value;
    	this.document.form.Datum[id].value = '' + year + '-' + month + '-' + day + '';
    	}
    
    //html
    <input type="text" OnBlur="DatumZetten(1)">
    Any and all help will be greatly appreciated.
    Many thanx in advance.

    P.S. Mods, if double-post is not appreciated, plz remove the least well-placed post

  • #2
    Senior Coder A1ien51's Avatar
    Join Date
    Jun 2002
    Location
    Between DC and Baltimore In a Cave
    Posts
    2,717
    Thanks
    1
    Thanked 94 Times in 88 Posts
    Tech Author [Ajax In Action, JavaScript: Visual Blueprint]

  • #3
    Senior Coder Mhtml's Avatar
    Join Date
    Jun 2002
    Location
    Sydney, Australia
    Posts
    3,531
    Thanks
    0
    Thanked 1 Time in 1 Post
    Cross posting in our forum and on another? And you admitted to cross posting in our forums? Doesn't make it any less of a crime, in fact shows you to be an undesirable user. Read our rules and posting guidelines before posting any new threads.

    You've been issued an infraction and warned for this. We keep our forums nice and clean which makes them worth coming back for.
    Last edited by Mhtml; 02-12-2007 at 03:12 PM.
    Omnis mico antequam dominus Spookster!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •