473,804 Members | 3,732 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

displaying calender dates in green

59 New Member
Hi all,

How will I change the color of the dates in the javascript calendar which already has some event entered for it. Like I have a form where the user enters the id and selects the date from calendar and leaves a comment for that date. This data will be stored in mysql database.

How can I change the color of dates in calendar so that if the user has already entered some comment for that then that date should become green color. How can I do this. Can anybody help me.

Here is the source code

form1.html
[HTML]<script type="text/javascript" src="date-picker.js"></script>
<form name="myform" action="test1.p hp" method="POST">
Your id : <input type="textbox" id="idno" name="idno">
Chosse date : <a STYLE="text-decoration: none" onmouseover="wi ndow.status='Da te Picker';return true;" onmouseout="win dow.status='';r eturn true;" href="javascrip t:show_calendar ('myform.date_i d')" >

<IMG height=21 src="calendar.g if" width=30 border=0></a>
<input type="textbox" class="textBox" type="text" readonly name="date_id" id="date_id" size="10">
Comments : <input type="textbox" id="comment" name="comment">
<input type="submit" value="click">
</form>[/HTML]

With regards
Feb 18 '08 #1
2 1188
Markus
6,050 Recognized Expert Expert
Assuming you save the date into the databse with the comment, you could use an if statement whether the date has a comment..
something like:
[php]
if($_row['commented'] == "yes")
{
echo "<span style=\"color: green;\">$_row['date']</span>";
}
[/php]
Feb 18 '08 #2
gubbachchi
59 New Member
Assuming you save the date into the databse with the comment, you could use an if statement whether the date has a comment..
something like:
[php]
if($_row['commented'] == "yes")
{
echo "<span style=\"color: green;\">$_row['date']</span>";
}
[/php]

Thanks for your reply.

I tried it, but it is not working. I checked if ($comment=="yes ") and tried the code
echo "<span style=\"color: green;\">$_row['date']</span>";

Can you give me some information on this, if possible.

With regards
Feb 18 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

8
7109
by: LG | last post by:
I want a script to make a calender for any month and with week numbers. Anyone who knows how to do that in javascript? LG
6
1790
by: stephan.vanbeerschoten | last post by:
Hi All, I am relatively new to MS Access but am wel suited in general relational databases. I seem to be unable to accomplish the displaying of query results that return more then one line item. I want to create a person record that can have multiple addresses, and I want all these addresses displayed on a form for manipulation, but I want to prevent saving the fields to the database as street1, street2, zipcode1, zipcode2, state1,...
4
2684
by: Chris | last post by:
Hi, I am trying to create a popup calender so a user can click on a button on the main form, a calender will then popup, the user will select a date and then click ok on the popup. The date will then be passed back to the main form and populate a textbox. I tried two options. None worked. First. I used the popup calender form the time tracker starter kit. On my page I have an image buton. In the click event I have the foll code
9
3227
by: Bosconian | last post by:
I must be having a brain freeze because I can't figure out how to display dates older than 1970. I have birth dates stored in MySQL as "date" data types (exp. 1955-04-06). I'd like to display as "April 4, 1955". I've tried using date("F j, Y"), but only get "December 31, 1969". I'm using PHP 4.3.8. Any suggestions would be appreciated.
1
1701
by: jm | last post by:
Hello, Anyone who knows how to create a calender in access like microsoft outlook, a calender where I can see the days bold if there's an item on that day. Thanx for answering, jean-marc
1
1125
by: continuum | last post by:
I am after a script that will redirect the user to another page (open in new window) after adding certain dates. for example, I have a drop down list with check in and check out dates. I put in check in date of 3/7/07 and check out 5/07/07 (and this may also be done in a calender pop up.) when I click search, it then takes me to a page which has those dated in the URL eg. http://www.widgets.com/hotel07-07-03_07-07-05.htm I hope this...
0
949
by: hiha | last post by:
Hi ! I wanted to change color of dates or encircle them when they are being selected in builtin control MonthCalender in vb2005. I could only make them see in bold font when we select the particular date in the event DateSelected Please can any one help me with changing the color of dates ... am badly stucked there.... Or do i have to create custom calender for serving the purpose? hiha
1
1086
by: ivsvarma | last post by:
I have the requirement with regards to Calender control, where in certain Dates needs to be disabled on the control load itself. Thanks! in advance.
1
3849
by: xtremebass | last post by:
Hello Bytes, i have a calender program which is created by using Javascript. when i execute that program using Internet Explorer,it works properly but when i tried in Mozilla firefox it didnt worked. Dates of particular year,month not displayed in that calender grids. i have collected that coding from online free resources. Here i have attached code for your reference. please do suggest me how do i display the calender date in grids in...
0
9706
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10335
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9157
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7621
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6854
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5652
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4301
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2993
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.