This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Updation of date column Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Updation of date column" Watch "Updation of date column" New topic

Updation of date column

Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342

I want to update date column of those rows which are checked. I have a popup date picker But my problem is how i can pass ids of those rows which are checked or name of text fields of columns in that function of date picker from html file.Can any one please guide me how i can do that.

I am pasting those portion of my codes


function Build(p_item, p_month, p_year, p_format) {
var p_WinCal = ggWinCal;
gCal = new Calendar(p_item, p_WinCal, p_month, p_year, p_format);

// Customize your Calendar here..

// Choose appropriate show function
if (gCal.gYearly)gCal.showY();;

function show_calendar() {
p_month : 0-11 for Jan-Dec; 12 for All Months.
p_year: 4-digit year
p_format: Date format (mm/dd/yyyy, dd/mm/yy, ...)
p_item: Return Item.

p_item = arguments[0];
if (arguments[1] == null)
p_month = new String(gNow.getMonth());
p_month = arguments[1];
if (arguments[2] == "" || arguments[2] == null)
p_year = new String(gNow.getFullYear().toString());
p_year = arguments[2];
if (arguments[3] == null)
p_format = "MM/DD/YYYY";
p_format = arguments[3];

vWinCal ="", "Calendar",
vWinCal.opener = self;
ggWinCal = vWinCal;

Build(p_item, p_month, p_year, p_format);
In html file Iam calling function like below :

onClick(Button) = show_calendar(calform.datebox)

where calform is form name and datebox is text field name of date column.

I can pass one text field name but i want to pass all text field name of date columns in that function which are checked by user so that when user click on date in date picker i can update dates of all columns which are checked.

[ January 25, 2005: Message edited by: Bikash Paul ]
Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
Hi Eric,

Do you have any suggestion about my problem......

Thanks & Regards
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30130

How many date columns do you have? If it is a small fixed number, you can pass them as parameters. If it is a lot or a dynamic number, you can use an array.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342

It's a dynamic number of columns . Can you please guide me how i can pass array of textfield name of columns in that function.

Eric Pascarello

Joined: Nov 08, 2001
Posts: 15376
how are all of the date fields named? naming convention?

It is sorta covered in the JavaRanch Style Guide.
subject: Updation of date column
Similar Threads
getting focused jtextfield in exteds jPanel
Problem with Text Field Formatting
how to make different date format validation ?
More .js Calendar Problems
Date and Time (tough one!)