show the date in textbox when we select item (items like--
today,yesterday,lastweek,lastmonth,lastyear) from
dropdownlist using javascript?
Answer / syed ahmed jawwad
<!--- Include Jquery Script, source www.jquery.com--->
<select id="dayType" name="dayType" onchange="showFields()">
<option>Today</option>
<option>Yesterday</option>
<option>Last Week</option>
<option>Last Month</option>
<option>Voucher Number</option>
</select>
<input type="text" id="dateValue" name="dateValue">
<script type="text/javascript">
function showFields()
{
if(jQuery('#dayType').val()=='Today' ||
jQuery('#dayType').val()=='Yesterday')
{
jQuery('#dateValue').datepicker({changemonth:
true, changeyear: true, dateformat:'mm/dd/yy'});
}else jQuery('#dateValue').datepicker('destroy');
}
</script>
| Is This Answer Correct ? | 3 Yes | 0 No |
What and where are the best javascript resources on the web?
What are trailing whitespace?
What are parameters in javascript?
In a pop-up browser window, how do you refer to the main browser window that opened it?
What is Number object in JavaScript?
What is the best free ide?
What is the use of a typedarray object in javascript?
What are ‘settimeout()’?
What is an example of javascript?
Write a program in Java to display the IP address of the local and remote machine.
0 Answers Annamalai University,
What is null in programming?
Is a hash table an array?