File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes Javascript onchange event Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Javascript onchange event " Watch "Javascript onchange event " New topic

Javascript onchange event

Satish Nair

Joined: Apr 04, 2012
Posts: 23
Dear All,
I have a form wherein in the option list i have displayed some countries. What i want is when i click on a particular country the date picker (ie date range) should get displayed .Kindly help
Paul Clapham

Joined: Oct 14, 2005
Posts: 19973

Sure, we can help. But you have to tell us what you need help with. From your post it isn't possible to guess what your problem is.

So, what have you done so far? Do you have some code which doesn't work right? Show us what you have and ask a question about that.
Satish Nair

Joined: Apr 04, 2012
Posts: 23
<form method="get" id="form1" name="form1">
<select name="sel" onchange="">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>

<script type='text/javascript'>
$(function() {
theme: true,
header: {
left: '',
center: '',
right: ''
defaultView: 'agendaDay',
editable: false,
events: "../fullcalendar/JSONcreator"
inline: true,
onSelect: function(dateText, inst) {
var d = new Date(dateText);
$('#calendar').fullCalendar('gotoDate', d);

Here i have a date function i want the above function to be called when a drop down item is selected
Keith Wood
Ranch Hand

Joined: Aug 28, 2012
Posts: 38

Is the datepicker attached to a div (inline) or an input field (popup)? If the former you could do something like this:

BTW, the jQuery UI datepicker doesn't allow the selection of a date range.

Author of the upcoming "Extending jQuery" book from Manning.
I agree. Here's the link:
subject: Javascript onchange event
It's not a secret anymore!