Discussion Locked

Typeover Code

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I am designing a calendar for a client with a rental company who would like to be able to place an "X" over dates as they become unavailable.

I don't know how to do this, and would appreciate if someone could give me some advice re this.

FYI: I am using javascript code for the calendar.

5 replies

by ananthap

I would suggest that you should:
(A) Use some simple graphics editor to design 31 images called TypeOvernn.jpg" - say, and here build the semi-transparent data as background with a large X superimposed. This is a "one-time" exercise.
(B) In the application, just change the "Value" to the appropriate picture file.
(C) Possible issues you have to think anbout before step (A) might be the resolution, colours etc.

Hope this helps.
End of mail.

by parkin_thom

Another (similar) approach is to rely on the BACKGROUND-IMAGE attribute of the TABLE in HTML.
I would assume you have structured your calendar as a Table object. This would allow it to resize properly in browsers of various sizes and resolutions.If so (if not, I suggest you do it), simply include the Dates as a single background image for the entire table. This way you would load a new single image each month.
Then use two other transparent gifs; one is completly transparent the other is an X that has a transparent background.
With a single onClick event you can toggle the .src value of the image(s) in any cell to be the totally-transparent gif or the X gif.
The background (calendar with dates) would show through as a background image.
I have not tested this on Netscape, some CSS stuff is flaky and the transparent background might be one of them. So try it. The exercise would be useful in and of itself!

This discussion is closed to new replies.