[Proto-Scripty] How to find no of months between two dates in the format of (MMM YYYY)

2011-02-02 Thread Pranki
Hi, I have a requirement , where in I have two combo boxes in my html file having dates in the format of MMM Eg: FEB 2011. Now i want to find out the difference between these two combo box dates in terms of months. I have to validate the form that the difference in between these two combo

Re: [Proto-Scripty] How to find no of months between two dates in the format of (MMM YYYY)

2011-02-02 Thread Phil Petree
Start here: http://www.w3schools.com/jsref/jsref_obj_date.asp Convert the 1st month to a digit such as Feb = 2 Convert the 2nd month to a digit such as Mar = 3 Create a date variable for the 1st month as: var d1 = new Date(year, MM1, day, hours, minutes, seconds, milliseconds); Create a date

Re: [Proto-Scripty] Execute action on server before Ajax.updater

2011-02-02 Thread Walter Lee Davis
You could do one Ajax request -- send the form elements and update the cart area (I'm guessing that's what you're doing here) with the return from that post: var myForm = $(form); new Ajax.Updater('items_container', 'servlet.do?storeItemId', {parameters:myForm.serialize()}); Just be sure

[Proto-Scripty] Re: part update of webpage

2011-02-02 Thread ColinFine
On Feb 1, 4:26 pm, kenny70 ke...@hibsonline.net wrote: Hi tried the following to update a dynamic table on a web page every 120 seconds (latest soccer scores) new PeriodicalExecuter(function(pe) {     new Ajax.Updater('score', 'latestscore.php', {       parameters: { somename: 'somevalue'

[Proto-Scripty] Create Option using prototype

2011-02-02 Thread greg
Hi folks, Is there a way using just new Element to create an Option element? To get it to work in FF and IE, I need to do the following: var o = new Element('Option', {'value': times[i], 'innerHTML': times[i]}); // for IE o.text = times[i]; // for FF This doesn't work in FF: var o = new