Click here to Skip to main content
15,886,806 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionDraw circuit diagram using javascript Pin
anishkannan18-Nov-12 22:31
anishkannan18-Nov-12 22:31 
AnswerRe: Draw circuit diagram using javascript Pin
n.podbielski19-Nov-12 21:07
n.podbielski19-Nov-12 21:07 
Answerto transfer items in select list to another select list without duplicates Pin
raviteja999200014-Nov-12 20:09
raviteja999200014-Nov-12 20:09 
QuestionHow does Yandex do its trick? Pin
Xarzu14-Nov-12 19:42
Xarzu14-Nov-12 19:42 
AnswerRe: How does Yandex do its trick? Pin
Manfred Rudolf Bihy14-Nov-12 20:44
professionalManfred Rudolf Bihy14-Nov-12 20:44 
Questiondisplay record from two different time Pin
uti123fil8-Nov-12 17:15
uti123fil8-Nov-12 17:15 
AnswerRe: display record from two different time Pin
Richard MacCutchan8-Nov-12 23:47
mveRichard MacCutchan8-Nov-12 23:47 
QuestionAdding a month to the current date Pin
SadiqMohammed6-Nov-12 23:48
SadiqMohammed6-Nov-12 23:48 
Hi,
I have a scenario where I have to enter a date in a text box in MM/DD/YYYY format and there is another text box where the value should be filled by itself and the value must be exactly one month from the entered date i.e, if my value in the first text box is 05/07/2012 second text box should automatically possess 05/08/2012 and this should be done by javascript, below is the code I tried but the second text box is taking the same value as the first text box, can someone please help me out with this issue and tell me what's wrong with the code


function populateArchiveDate() {
var frm=document.form1

if (validateDateFormat(frm.story_intro_date) && frm.story_exp_date.disabled == false) {

var post_date = new Date(frm.story_intro_date.value);
alert(post_date.getMonth());
var expiration_date = new Date(post_date.setMonth(post_date.getMonth() + 1));
alert(expiration_date.getMonth());

if (expiration_date.getMonth() == 0)
expiration_date = expiration_date.getMonth() + 1 + "/" + expiration_date.getDate() + "/" + expiration_date.getFullYear();
else
expiration_date = expiration_date.getMonth() + "/" + expiration_date.getDate() + "/" + expiration_date.getFullYear();

frm.story_exp_date.value = expiration_date;
frm.hdn_story_exp_date.value = expiration_date;






Thanks in advance Smile | :)
AnswerRe: Adding a month to the current date Pin
Richard Deeming7-Nov-12 2:00
mveRichard Deeming7-Nov-12 2:00 
GeneralRe: Adding a month to the current date Pin
SadiqMohammed7-Nov-12 18:31
SadiqMohammed7-Nov-12 18:31 
GeneralRe: Adding a month to the current date Pin
Richard Deeming8-Nov-12 2:11
mveRichard Deeming8-Nov-12 2:11 
GeneralRe: Adding a month to the current date Pin
SadiqMohammed8-Nov-12 19:08
SadiqMohammed8-Nov-12 19:08 
AnswerRe: Adding a month to the current date Pin
deepak.m.shrma19-Nov-12 18:07
deepak.m.shrma19-Nov-12 18:07 
GeneralRe: Adding a month to the current date Pin
Peter_in_278019-Nov-12 18:58
professionalPeter_in_278019-Nov-12 18:58 
GeneralRe: Adding a month to the current date Pin
deepak.m.shrma19-Nov-12 19:52
deepak.m.shrma19-Nov-12 19:52 
QuestionNeed to pass object value from javascript to php Pin
gern844-Nov-12 10:08
gern844-Nov-12 10:08 
SuggestionRe: Need to pass object value from javascript to php Pin
n.podbielski4-Nov-12 12:56
n.podbielski4-Nov-12 12:56 
GeneralRe: Need to pass object value from javascript to php Pin
gern844-Nov-12 13:29
gern844-Nov-12 13:29 
GeneralRe: Need to pass object value from javascript to php Pin
n.podbielski4-Nov-12 20:48
n.podbielski4-Nov-12 20:48 
GeneralRe: Need to pass object value from javascript to php Pin
zengnanhua22-Nov-12 18:27
zengnanhua22-Nov-12 18:27 
GeneralRe: Need to pass object value from javascript to php Pin
Killzone DeathMan22-Nov-12 23:39
Killzone DeathMan22-Nov-12 23:39 
QuestionWindow restore Pin
mkotaska1-Nov-12 6:00
mkotaska1-Nov-12 6:00 
AnswerRe: Window restore Pin
ZurdoDev2-Nov-12 11:03
professionalZurdoDev2-Nov-12 11:03 
Questionunzip the .gzip files Pin
KIDYA31-Oct-12 19:44
KIDYA31-Oct-12 19:44 
AnswerRe: unzip the .gzip files Pin
Jay Zhu2-Nov-12 17:20
Jay Zhu2-Nov-12 17:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.