www.webdeveloper.com
Results 1 to 9 of 9

Thread: [RESOLVED] How do i change the value in DIV tag Automatically

  1. #1
    Join Date
    May 2008
    Posts
    130

    resolved [RESOLVED] How do i change the value in DIV tag Automatically

    I used div tag in my field. that field has date value. there is another field that is also date field and it's in div tag.

    when i change the first date field automatically second date field should be changed with the first date value.

    Here is my first date field code.

    Code:
       <div id=apptTimeEditOD style="display:<%=appt.allday()?"none":"block" %>; padding: 4px 4px 4px 4px; position: absolute; width: 90; height: 22; left: 85; top: 2; text-align: left;">
          <%=_r.drawDatePicker( _ahsPage, "startDate", appt.getApptDate()) %>
       </div>
    Here is my second date field code.

    Code:
       <div id=apptTimeEditEnD style="display:<%=appt.allday()?"none":"block" %>; padding: 4px 4px 4px 4px; position: absolute; width: 90; height: 22; left: 85; top: 2; text-align: left;">
          <%=_r.drawDatePicker( _ahsPage, "startDate1", appt.getApptDate() )%>
          <div id=apptODEndTime style="position: absolute; width: 90; height: 22; left: 140; top: 2; text-align: left;" > </div>
        </div>
    how do i change my 2nd date field value with first date value when i do change in first date field.

  2. #2
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    How do you change the first date field automatically?

  3. #3
    Join Date
    May 2008
    Posts
    130
    Thanks for reply. I have two date fields in my JSP. one is StartDate and anohter one is EndDate. Each field has testbox and Calener icon, to choose the date from the calendar. Calendar icon shoud be placed right side to that textbox.

    If i choose date in StartDate field same date should be replace in EndDate field also.

  4. #4
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Choose how?

  5. #5
    Join Date
    May 2008
    Posts
    130
    i.e Select date from StartDate , I have Calendar icon right to the test field when i click on that image it will open the calendar popup for 3 months ( previous, current , coming month). When i select the date from that popup window , the selected date will display in StartDate test field. My requirement is the selected is placed in startDate field automatically same date should be display in EndDate field also.

  6. #6
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    Find the statement in the calender script where the date is inserted in the StartDate test field. Pass this same value to the EndDate field.

  7. #7
    Join Date
    May 2008
    Posts
    130
    how do i pass the same value ? Here it happends only the client side action. can you tell me how do i pass ?

  8. #8
    Join Date
    Apr 2003
    Location
    Netherlands
    Posts
    21,654
    document.formName.EndDate .value=data;

  9. #9
    Join Date
    May 2008
    Posts
    130
    It's working . Thanks for your help.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles