Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
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 Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Updation of date column" Watch "Updation of date column" New topic
Author

Updation of date column

Bikash Paul
Ranch Hand

Joined: Dec 04, 2001
Posts: 342
Hi,

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

date_picker.js
===============

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..
gCal.gBGColor="white";
gCal.gLinkColor="black";
gCal.gTextColor="black";
gCal.gHeaderColor="darkgreen";

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

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());
else
p_month = arguments[1];
if (arguments[2] == "" || arguments[2] == null)
p_year = new String(gNow.getFullYear().toString());
else
p_year = arguments[2];
if (arguments[3] == null)
p_format = "MM/DD/YYYY";
else
p_format = arguments[3];

vWinCal = window.open("", "Calendar",
"width=250,height=250,status=no,resizable=no,top=200,left=200");
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.



Thanks
Bikash
[ 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
Bikash
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29287
    
140

Bikash,
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
Hi,

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.

Thanks
Bikash
Eric Pascarello
author
Rancher

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

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Updation of date column
 
Similar Threads
More .js Calendar Problems
Problem with Text Field Formatting
how to make different date format validation ?
getting focused jtextfield in exteds jPanel
Date and Time (tough one!)