...

View Full Version : [OOP-noob] Process numbered fields by id-number ? (also posted in DOM)



OrBeX
02-12-2007, 12:52 PM
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 ?




//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 ;)

A1ien51
02-12-2007, 03:57 PM
already got an answer here: http://www.webdeveloper.com/forum/showthread.php?t=138058

Eric

Mhtml
02-12-2007, 04:07 PM
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 (http://www.codingforums.com/rules.htm) and posting guidelines (http://www.codingforums.com/postguide.htm) 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.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum