Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Answers Viewqa Date-Calendar How to add two calendars on the same html page
Login         

View Questions and Answers by Category

Advertisements


 
Have Programming Question? Ask it here!
 
 
 


Nilima Avinash Raut
How to add two calendars on the same html page
2 Answer(s)      2 years and 11 months ago
Posted in : Date-Calendar


I have used the same code as on this site http://www.roseindia.net/javascript/javascript-calendar.shtml for implementing calendar for my project.and the code is working fine when i use single calendar for a single html page.but while implementing two calendars on same html page it doesn't work..The first calendar works but the second calendar doesn't work.

I have googled it out and learnt that only we need to change the id..But i was unable to do find which id needs to be changed in this code.

Please someone help me with this..


Advertisement
View Answers

November 30, 2011 at 1:14 PM


Do changes in calendar.hmtl file. Rest of the code remains same.

<html>
<head>
   <title>Java Script Calender Date Picker</title>
   <meta http-equiv="Content-Type" content="text/html;">
   <script language="javaScript" type="text/javascript" src="calendar.js"></script>
     <link href="calendar.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#666666">
    <form>
      <input type="text" name="datum1"><a href="#" 
       onClick="setYears(1947, 2012);
       showCalender(this, 'datum1');">
       <img src="calender.png"></a>
<br>
       <input type="text" name="datum2"><a href="#" 
       onClick="setYears(1947, 2012);
       showCalender(this, 'datum2');">
      <img src="calender.png"></a>

    </form>

    <!-- Calender Script  --> 

    <table id="calenderTable">
       <tbody id="calenderTableHead">
         <tr>
           <td colspan="4" align="center">
         <select onChange="showCalenderBody(
                   createCalender(document.getElementById('selectYear').value,
               this.selectedIndex, false));"
                   id="selectMonth">
                  <option value="0">Jan</option>
                  <option value="1">Feb</option>
                  <option value="2">Mar</option>
                  <option value="3">Apr</option>
                  <option value="4">May</option>
                  <option value="5">Jun</option>
                  <option value="6">Jul</option>
                  <option value="7">Aug</option>
                  <option value="8">Sep</option>
                  <option value="9">Oct</option>
                  <option value="10">Nov</option>
                  <option value="11">Dec</option>
              </select>
            </td>
            <td colspan="2" align="center">
        <select onChange="showCalenderBody(createCalender(this.value, 
          document.getElementById('selectMonth').selectedIndex, false));"
              id="selectYear">
        </select>
            </td>
           <td align="center">
        <a href="#" onClick="closeCalender();">
              <font color="#003333" size="+1">X</font>
            </a>
       </td>
    </tr>
       </tbody>
       <tbody id="calenderTableDays">
         <tr style="">
           <td>Sun</td><td>Mon</td><td>Tue</td><td>Wed</td>
           <td>Thu</td><td>Fri</td><td>Sat</td>
         </tr>
       </tbody>
       <tbody id="calender"></tbody>
    </table>

<!-- End Calender Script  --> 

  </body>
</html>


November 30, 2011 at 2:29 PM


Thanks this was what i expected..

Thanks a lot



Related Tutorials/Questions & Answers:
How to add two calendars on the same html page
How to add two calendars on the same html page  I have used the same... use single calendar for a single html page.but while implementing two calendars on same html page it doesn't work..The first calendar works but the second
add same tables in jsp page
add same tables in jsp page  hi I have a table in my jsp page with data, now I want to add same copy of table without its default value in same page whenever I click add more table, how do I do
Advertisements
how to add the two tables in same row when generating pdf file from jsp - JSP-Servlet
how to add the two tables in same row when generating pdf file from jsp  How to add the two tables in same row one is left side and other is right side please help me.   Hi Friend, Try the following code
how to add the calendar to the dynamic rows in html or jsp page - JSP-Servlet
how to add the calendar to the dynamic rows in html or jsp page   Hi Sir, i have 3 columns in my jsp page date of payment,amount recieved,no and i have 2 button in my jsp page ADD and delete button. when i click on add
to upload a table from DB to the same html page
to upload a table from DB to the same html page  how to make this booklist table to be opened in the same html page itself using a third frame
how i connect two page
how i connect two page  strong textlink text
how to show hyperlink website on the same page
how to show hyperlink website on the same page  dear sir: i need to know how can you show a webiste on the same page. for example i want to show... on the same page weather it is left aligned or right. i read somewhere that you
how to add pageup page down functionality in scrolpane
how to add pageup page down functionality in scrolpane  how to add pageup page down functionality in scrolpane. In my GUI untill i dont click on screen area , the page up & pagedown button not works . what should i do to make
how to add web cam in web page
how to add web cam in web page  how do i embed my webcam in web page. code for embedding web cam in web page
How to redirect from a HTML page?
How to redirect from a HTML page?  Hi, Is it possible to redirect from HTML page to another page on the net? I have one page and I want to redirect... to redirect to another page using HTML code. You can use the following code: <meta
how to add new column before two column in sql.
how to add new column before two column in sql.  how to add new column in table before two column in sql.   Syntax of Alter table: ALTER... named 'employee' having three fields id, name and salary. Now we want to add two
how to add new column before two column in sql.
how to add new column before two column in sql.  how to add new column in table before two column in sql.   Syntax of Alter table: ALTER... named 'employee' having three fields id, name and salary. Now we want to add two
how to add new column before two column in sql.
how to add new column before two column in sql.  how to add new column in table before two column in sql.   Syntax of Alter table: ALTER... named 'employee' having three fields id, name and salary. Now we want to add two
how to add new column before two column in sql.
how to add new column before two column in sql.  how to add new column in table before two column in sql.   Syntax of Alter table: ALTER... named 'employee' having three fields id, name and salary. Now we want to add two
how to do two database tables in one page?
how to do two database tables in one page?  dear all: i want to show these two database tables in one page. one table on the left (dbtable.jsp) and the other on the right (table2.jsp). how can i do that with HTML? this is my
Add two number in java
Add two number in java In this section you will learn about how to add two... be added, So two add,  convert these String into numeric type..."); System.out.println("Please Enter two number to add :"); Scanner sin=new
How can you add elements of two arrayLists in java?
How can you add elements of two arrayLists in java?  if you have an arrayList of tempArr = [hi, my, name, is, john] and another arrayList..., is d, john e] how do you go about
How to display content in same page while selecting fron dropdown list
How to display content in same page while selecting fron dropdown list ... HTML page is created and is sent to the browser so, any event is encountered...),then it want to display all records from table specific to that rollno in that same
how to add two object in a particular file - Java Beginners
how to add two object in a particular file  Hi frend.. I have two arraylist object in which there is some data..............now i want to add these two objects in a particular file using file handling in java....and also
How To Include Two Jsp page in another jsp page?
How To Include Two Jsp page in another jsp page?  I use following code to Include Two Jsp Page Header and footer <%@include file="header.jsp... in page How can i Display at correct position?   Please visit
Displaying checked checkbox in same page as well as print on another page ....also add next pages cheches checkbox into previous list
Displaying checked checkbox in same page as well as print on another page... page. It works... But when i go to another page link containing same format... page's selected checkbox in display list on same pages respectively.( i don't
how to use dropdown list in JSP and display value in same page
in the same page Value selected = C How can we do this in a JSP page...how to use dropdown list in JSP and display value in same page  I... one option the value must get displayed below it in the same page
How can I output text typed in textarea by user on the same page?
How can I output text typed in textarea by user on the same page?  I have a basic HTML page where I have created a textarea for users comments. I would like to take the comments and append them to the same page for all to see
How to display content in same page while selecting fron dropdown list
How to display content in same page while selecting fron dropdown list  Thanks for your suggesstion.but Please provide me coding by using only one dropdownlist in javascript or jquery.Thanks in advance
HOW TO DISPLAY ID IN TEXTBOX BASED ON COMBOBOX SELECTION IN A SAME PAGE
HOW TO DISPLAY ID IN TEXTBOX BASED ON COMBOBOX SELECTION IN A SAME PAGE ... is how to get Roleid in textbox when i select Role_name from combobox in a same... SystemAdmin 2 Office Bearer Am loading this Rolename into one page called
Add two big numbers
Add two big numbers       In this section, you will learn how to add two big numbers...): This method is used to add the two BigDecimal numbers. Here is the code of program
how to get values for same column name from two different tables in SQL
how to get values for same column name from two different tables in SQL  how to get values for same column name from two different tables in SQL???? column name is emp_id loacated in these two tables company,employee
Two or more actions in the same form
Two or more actions in the same form  Can I have two or more actions in the same form
how to include an html page inside a tab
how to include an html page inside a tab  how to include an static html page inside a tab(in jquery)   Please visit the following links...;actually i want to knw how to include an google page inside a tab(suppose in 2nd
How to browse and upload the file in same page using jsp.
How to browse and upload the file in same page using jsp.  Hi Sir... the file in cell if a table in same page, post answer as soon as possible.thanks... to server and saved into database. upload.jsp <%@ page import="java.io.
How to browse and upload the file in same page using jsp.
How to browse and upload the file in same page using jsp.  Hi, I am doing a project and i want to browse and upload the file in same page inside... and saved into database. upload.jsp <%@ page import="java.io.*" %> <
Advertisements
 

 

 

DMCA.com