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



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

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 8 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 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 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 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 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 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 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 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
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
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 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, 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.*" %> <
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 add google page in my webpage using jquery ajax.
How to add google page in my webpage using jquery ajax.  Hi, I created a page index.html on desktop . this page content following code. <html>... not open on my browser. how google page will load using ajax. thanks
How to pass parametes from JSP page to HTML page? - JSP-Servlet
How to pass parametes from JSP page to HTML page?  Hi all, In my project I have one JSP page and one HTML page. In JSP page I have created HTML... with the username in HTML which I have called in JSP page. So I just want
Servlets errors in same page.
Servlets errors in same page.  How do I display errors list in the same page where a form field exists using servlets...........i.e. without using JSP? Please explain with a simple username password program
Applet for add two numbers
Applet for add two numbers  what is the java applet code for add two...); add(text2); label3 = new Label("Sum of Two Numbers...: "); label1.setBounds(20,20,100,20); add(label1); text1 = new TextField(5
how to execute the below servlet with html page
how to execute the below servlet with html page  //vallidate user n...,ServletException { res.setContentType("text/html"); PrintWriter out=res.getWriter... res)throws IOException,ServletException { res.setContentType("text/html
Two Pagination in one page
Two Pagination in one page  hai friends any one help me. how do u make two pagination script in same page i'm used some ajax coding one pagination script is working but another pagination is not working please help me urgent
how to pass form values from javascript of html page to jsp page
how to pass form values from javascript of html page to jsp page   This is my sample html page which contains inline javascript which calculates the geocode and tries to return the lattitude and longitude .But my question is how
populating a screen on the same page
populating a screen on the same page  i'm making a time table in jsp... to a new page which will help them to choose the subject and faculty through drop... to select the subject and faculty....so that we dont need to redirect to other page
Posting comments to same page with textarea
to the same page. Many thanks for that. However I wanted it to add other...Posting comments to same page with textarea  I have been given some... great code Comment: user two wrote I agree Comment: user three wrote I agree
how to add Arraylist filter for a jsp page showing results from a servlet
how to add Arraylist filter for a jsp page showing results from a servlet ... page table of given contents of database, i want to add a filter to it to show... .............going on... but i want the result to display page only for class_id::11
login for different user in the same page
login for different user in the same page  how can i do the login for different user in the same page throug jsp
how to call servlet from html page at anchor tag ?
how to call servlet from html page at anchor tag ?  I have a very... it is not working properly. I split and merge template. In the header part of my page i use... to other page and at that place i give url of a servlet but in server that url
display results on same jsp page
display results on same jsp page  is there any method to display search results from database on the same jsp page where i give the inputs using struts 1.2
display results on same jsp page
display results on same jsp page  is there any method to display search results from database on the same jsp page where i give the inputs using struts 1.2
display results on same jsp page
display results on same jsp page  is there any method to display search results from database on the same jsp page where i give the inputs using struts 1.2
divide html page
divide html page   how to divide html page into 3 parts without using frames
Populate value into HTML page
Populate value into HTML page  Hi, How to populate values from one html page table to another html page..? Thanks
Add music to my web page
Add music to my web page  How do I add midi music to my web page
page breaks in HTML
page breaks in HTML  How do I specify page breaks in HTML
page breaks in HTML
page breaks in HTML  How do I specify page breaks in HTML
 

 

 

DMCA.com