× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Jeffrey,

I've actually had some fairly good luck with this...this is how I went 
about doing it...

Download the jsCalendar zip file from this site: 
http://sourceforge.net/project/showfiles.php?group_id=75569&release_id=170375

Once unzipped, I renamed the calendar-en.js to dcalendar-en.js...for some 
reason, it has to see this .js after the calendar.js file...anyways, once 
that's done, I opened the Navigator view and put the calendar.js, 
dcalendar-en.js & mycalendar.js files into a webfaced application's 
WebContent/webfacing/ClientScript/usr/ folder...then, place the cal.gif 
image into the WebContent/webfacing/images/ folder...finally, in your 
WebContent/webfacing/styles/ folder, put the calendar-win2k-1.css file in 
there...

now, open your DDS source in the Webfacing Projects tab...right-click on 
the DDS file that's gonna have the calendar and select Open With -> Code 
Designer...on the screen that's to display the calendar, select a date 
field where the user would normally just enter the date...then, click the 
Web Settings tab and select Insert HTML...inside that, select the After 
tab and enter the following:

<DIV style="position: absolute;"><A href=# onclick="return 
showCalendar('l<%=zOrder%>_NEWWO$SDATEN', '%m/%d/%Y');"> \r\n<IMG 
src="images/cal.gif" width="23" height="23" border="0"></A></DIV>

you'll want to change the NEWWO to the name of the DDS record and the 
SDATEN to the name of the actual date field...for example, if you had the 
following DDS code:

A          R INTROSCRN
A                                      CF10(10 'Save')
A                                      CF03(03 'Exit')
A                                                     7   2'Please enter a 
Date:'
A            DATEFLD      8Y 0B  7 25
A                                      COLOR(WHT)
A                                      EDTWRD('  /  /    ')
A                                 23  2'F3=Exit' 
A                                      COLOR(BLU) 
A                                 23 24'F10=Save'
A                                      COLOR(BLU)

you'd make the code look like this:

<DIV style="position: absolute;"><A href=# onclick="return 
showCalendar('l<%=zOrder%>_INTROSCRN$DATEFLD', '%m/%d/%Y');"> \r\n<IMG 
src="images/cal.gif" width="23" height="23" border="0"></A></DIV>

this format (%m/%d/%Y) returns a mm/dd/ccyy format...however, you can 
change it to say %m/%d/%y to have it return a 6 digit date instead...it's 
just a matter of playing around with the format to get it to return the 
desired date...

hope this helps...

Shane Cessna  
iSeries Programmer
iSeries WAS Administrator
North American Lighting, Inc.
(618) 662-4483 x2776
shane_cessna@xxxxxxx 



Jeffrey Young <cooljeff913@xxxxxxxxx> 
Sent by: web400-bounces@xxxxxxxxxxxx
05/31/2005 12:44 PM
Please respond to
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>


To
web400@xxxxxxxxxxxx, code400-l@xxxxxxxxxxxx
cc

Subject
[WEB400] Webface Popup Calendar






Has anyone implemented a popup calendar in a Webface application?
 
I have the Mastering Webface redbook and the downloads, but where 
do I put the java scripts in the project?
Also, if you have implemented any other type of calendar (I actualy 
need one that will return mmddyy format) please advise what to put 
where.
 I have seen a number of free js calendars on the web, but do not 
know how to implement in a webface application.

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.