ok so show me how you would put them together then, also are you getting any errors ?
On Jul 14, 11:04 am, Sarm <sarm.desig...@gmail.com> wrote: > If i will remove this following > > <link type="text/css" href="js/ui.all.css" rel="stylesheet" /> > <script type="text/javascript" src="js/jquery-1.3.2.js"></script> > <script type="text/javascript" src="js/ui.datepicker.js"></script> > <link type="text/css" href="js/demos.css" rel="stylesheet" /> > <script type="text/javascript"> > $(function() { > $("#theDate").datepicker({altField: '#theDate', altFormat: > 'dd-mm-yy'}); > }); > $(function() { > $("#theDate1").datepicker({altField: '#theDate1', altFormat: > 'dd-mm-yy'}); > }); > </script> > > then above one will work but if both will be on same page then only calender > working. > > Thanks > > On Tue, Jul 14, 2009 at 6:58 PM, Mean Mike <mcgra...@gmail.com> wrote: > > > I'm confused are you saying this doesn't work ? > > <script language="javascript" src="Jquery.js"></script> > > <script language="javascript"> > > function makeSublist(parent,child,isSubselectOptional,childVal) > > { > > $("body").append("<select style='display:none' > > id='"+parent+child+"'></select>"); > > $('#'+parent+child).html($("#"+child+" option")); > > > var parentValue = $('#'+parent).attr('value'); > > $('#'+child).html($("#"+parent+child > > +" .sub_"+parentValue).clone()); > > > childVal = (typeof childVal == "undefined")? "" : childVal ; > > $("#"+child+' opti...@value="'+ childVal > > +'"]').attr('selected','selected'); > > > $('#'+parent).change( > > function() > > { > > var parentValue = $('#'+parent).attr('value'); > > $('#'+child).html($("#"+parent+child+" > > .sub_"+parentValue).clone()); > > //if(isSubselectOptional) $('#'+child).prepend("<option > > value='none'> -- Select -- </option>"); > > $('#'+child).trigger("change"); > > $('#'+child).focus(); > > } > > ); > > > } > > > $(document).ready(function() > > { > > makeSublist('child','grandsun', true, ''); > > makeSublist('parent','child', false, '1'); > > }); > > </script> > > > if so are you getting any errors and are you sure your calling the > > right copy of jquery as I see it is different than whats in the second > > half of your post