• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 221
  • Last Modified:

Triggering an event for input tag that is readonly

Below is the attached code, i have an input tag where its value is selected from anchor tag. How do i trigger an event that validates the entered date as soon it is selected from the anchor tag(calendar)

Which event attribute should i use in such a case
<input type="text" class="txt3" name="fromDate" id="fromDate" onmouseup="validateFromDate(fromDate.value)" readonly>
								<a href="#" onClick="setYears(2000,2050);showCalender(this,'fromDate');">
								<img src="../../images/calender.png" border="0"></a>

Open in new window

0
Mavidy
Asked:
Mavidy
  • 2
1 Solution
 
quincydudeCommented:
does onchange work?
<input type="text" class="txt3" name="fromDate" id="fromDate" onchange="validateFromDate(fromDate.value)" readonly>
								<a href="#" onClick="setYears(2000,2050);showCalender(this,'fromDate');">
								<img src="../../images/calender.png" border="0"></a>

Open in new window

0
 
quincydudeCommented:
Also this
<meta http-equiv="expires" content="0">

Open in new window

0
 
Michel PlungjanIT ExpertCommented:
You need to repeat the onmouseup code
for example
onmouseup="validateFromDate(fromDate.value)" readonly>
                                                <a href="#" onClick="setYears(2000,2050);showCalender(this,'fromDate');validateFromDate(fromDate.value); return false">
                                                

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Microsoft Exchange Server

The MCTS: Microsoft Exchange Server 2010 certification validates your skills in supporting the maintenance and administration of the Exchange servers in an enterprise environment. Learn everything you need to know with this course.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now