Question

4
Replies
685
Views
Anoop Korah (Anoop)
empower retirement

empower retirement
IN
Anoop Member since 2013 6 posts
empower retirement
Posted: September 28, 2015
Last activity: September 29, 2015
Posted: 28 Sep 2015 10:34 EDT
Last activity: 29 Sep 2015 11:33 EDT
Closed

Problem in Accessing HTML ID element from JAVASCRIPT

For Calendar ,  we are unable to access the value of the Calender elements from javascript

Example

--------

HTML code

---------------

  <td width="25%" NOWRAP style="text-align:left" class="dataLabelStyle">Request Date<font style="padding-left: 5px; color: red;font-weight: bold;">*</font></td>

         <td width="50%" style="padding-left: 5px" >

   {ScanDate input Date-Calendar}

  </td>

We are Unable to access the element ScanDate from JavaScript by using document.getElementById(ScanDate).

As a temporary solution we are using the following method

-----

Right Click on the element at run time-->View Source and we are taking ID at the run time ID.

eg::

document.getElementById("cal$PpyPortal$pScanDateField").value;

System Administration Upgrades
Moderation Team has archived post, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.