Click here to Skip to main content
12,697,103 members (24,581 online)

JavaScript

 
AnswerRe: form validation Pin
Richard MacCutchan21-Nov-12 23:17
mvpRichard MacCutchan21-Nov-12 23:17 
GeneralRe: form validation Pin
therainking7828-Nov-12 14:14
membertherainking7828-Nov-12 14:14 
AnswerRe: form validation Pin
bVagadishnu28-Nov-12 12:14
memberbVagadishnu28-Nov-12 12:14 
GeneralRe: form validation Pin
therainking7828-Nov-12 14:17
membertherainking7828-Nov-12 14:17 
Questionopeing a new window in JS after time interval Pin
WaqasCheema21-Nov-12 0:36
memberWaqasCheema21-Nov-12 0:36 
AnswerRe: opeing a new window in JS after time interval Pin
Andrew Stoute30-Nov-12 5:51
memberAndrew Stoute30-Nov-12 5:51 
QuestionDraw circuit diagram using javascript Pin
anishkannan18-Nov-12 23:31
memberanishkannan18-Nov-12 23:31 
AnswerRe: Draw circuit diagram using javascript Pin
n.podbielski19-Nov-12 22:07
membern.podbielski19-Nov-12 22:07 
Answerto transfer items in select list to another select list without duplicates Pin
raviteja999200014-Nov-12 21:09
memberraviteja999200014-Nov-12 21:09 
QuestionHow does Yandex do its trick? Pin
Xarzu14-Nov-12 20:42
memberXarzu14-Nov-12 20:42 
AnswerRe: How does Yandex do its trick? Pin
Manfred R. Bihy14-Nov-12 21:44
mvpManfred R. Bihy14-Nov-12 21:44 
Questiondisplay record from two different time Pin
uti123fil8-Nov-12 18:15
memberuti123fil8-Nov-12 18:15 
AnswerRe: display record from two different time Pin
Richard MacCutchan9-Nov-12 0:47
mvpRichard MacCutchan9-Nov-12 0:47 
QuestionAdding a month to the current date Pin
SadiqMohammed7-Nov-12 0:48
memberSadiqMohammed7-Nov-12 0: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 3:00
memberRichard Deeming7-Nov-12 3:00 
GeneralRe: Adding a month to the current date Pin
SadiqMohammed7-Nov-12 19:31
memberSadiqMohammed7-Nov-12 19:31 
GeneralRe: Adding a month to the current date Pin
Richard Deeming8-Nov-12 3:11
memberRichard Deeming8-Nov-12 3:11 
GeneralRe: Adding a month to the current date Pin
SadiqMohammed8-Nov-12 20:08
memberSadiqMohammed8-Nov-12 20:08 
AnswerRe: Adding a month to the current date Pin
deepak.m.shrma19-Nov-12 19:07
memberdeepak.m.shrma19-Nov-12 19:07 
GeneralRe: Adding a month to the current date Pin
Peter_in_278019-Nov-12 19:58
memberPeter_in_278019-Nov-12 19:58 
GeneralRe: Adding a month to the current date Pin
deepak.m.shrma19-Nov-12 20:52
memberdeepak.m.shrma19-Nov-12 20:52 
QuestionNeed to pass object value from javascript to php Pin
gern844-Nov-12 11:08
membergern844-Nov-12 11:08 
SuggestionRe: Need to pass object value from javascript to php Pin
n.podbielski4-Nov-12 13:56
membern.podbielski4-Nov-12 13:56 
GeneralRe: Need to pass object value from javascript to php Pin
gern844-Nov-12 14:29
membergern844-Nov-12 14:29 
GeneralRe: Need to pass object value from javascript to php Pin
n.podbielski4-Nov-12 21:48
membern.podbielski4-Nov-12 21:48 
GeneralRe: Need to pass object value from javascript to php Pin
zengnanhua22-Nov-12 19:27
memberzengnanhua22-Nov-12 19:27 
GeneralRe: Need to pass object value from javascript to php Pin
Killzone DeathMan23-Nov-12 0:39
memberKillzone DeathMan23-Nov-12 0:39 
QuestionWindow restore Pin
mkotaska1-Nov-12 7:00
membermkotaska1-Nov-12 7:00 
AnswerRe: Window restore Pin
ryanb312-Nov-12 12:03
memberryanb312-Nov-12 12:03 
Questionunzip the .gzip files Pin
KIDYA31-Oct-12 20:44
memberKIDYA31-Oct-12 20:44 
AnswerRe: unzip the .gzip files Pin
Jay Zhu2-Nov-12 18:20
memberJay Zhu2-Nov-12 18:20 
Questioni have created 3 widgets using jquery ui - header, footer, textarea. i am observing abnormal behavior because of the footer widget. Pin
Abhishek Prakash30-Oct-12 6:53
memberAbhishek Prakash30-Oct-12 6:53 
AnswerRe: i have created 3 widgets using jquery ui - header, footer, textarea. i am observing abnormal behavior because of the footer widget. Pin
n.podbielski30-Oct-12 22:48
membern.podbielski30-Oct-12 22:48 
GeneralRe: i have created 3 widgets using jquery ui - header, footer, textarea. i am observing abnormal behavior because of the footer widget. Pin
Abhishek Prakash31-Oct-12 0:40
memberAbhishek Prakash31-Oct-12 0:40 
GeneralRe: i have created 3 widgets using jquery ui - header, footer, textarea. i am observing abnormal behavior because of the footer widget. Pin
Abhishek Prakash31-Oct-12 0:48
memberAbhishek Prakash31-Oct-12 0:48 
GeneralRe: i have created 3 widgets using jquery ui - header, footer, textarea. i am observing abnormal behavior because of the footer widget. Pin
n.podbielski31-Oct-12 2:50
membern.podbielski31-Oct-12 2:50 
GeneralRe: i have created 3 widgets using jquery ui - header, footer, textarea. i am observing abnormal behavior because of the footer widget. Pin
Abhishek Prakash31-Oct-12 3:44
memberAbhishek Prakash31-Oct-12 3:44 
GeneralRe: i have created 3 widgets using jquery ui - header, footer, textarea. i am observing abnormal behavior because of the footer widget. Pin
n.podbielski31-Oct-12 7:11
membern.podbielski31-Oct-12 7:11 
QuestionWorking example for Javascript to call a java webservice Pin
sekhar48430-Oct-12 0:50
membersekhar48430-Oct-12 0:50 
AnswerRe: Working example for Javascript to call a java webservice Pin
Richard MacCutchan30-Oct-12 1:54
mvpRichard MacCutchan30-Oct-12 1:54 
AnswerRe: Working example for Javascript to call a java webservice Pin
ryanb312-Nov-12 12:04
memberryanb312-Nov-12 12:04 
GeneralRe: Working example for Javascript to call a java webservice Pin
Member 946160725-Nov-12 20:32
memberMember 946160725-Nov-12 20:32 
QuestionJS::Page a serious fault Pin
lsw52131425-Oct-12 22:14
memberlsw52131425-Oct-12 22:14 
AnswerRe: JS::Page a serious fault Pin
enhzflep27-Oct-12 10:57
memberenhzflep27-Oct-12 10:57 
QuestionFill a "2D" Array with random values Pin
0bx24-Oct-12 13:27
member0bx24-Oct-12 13:27 
AnswerRe: Fill a "2D" Array with random values Pin
enhzflep26-Oct-12 21:52
memberenhzflep26-Oct-12 21:52 
QuestionFlexigrid Pin
chandra reinhart15-Oct-12 2:23
memberchandra reinhart15-Oct-12 2:23 
Questionpagination Pin
millekekez12-Oct-12 23:32
membermillekekez12-Oct-12 23:32 
QuestionProblem with IE 9 Pin
giocot11-Oct-12 8:21
membergiocot11-Oct-12 8:21 
AnswerRe: Problem with IE 9 Pin
Member 950758612-Oct-12 0:02
memberMember 950758612-Oct-12 0:02 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 20 Jan 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid