/    Sign up×
Community /Pin to ProfileBookmark

Stuck with a date script

hey can anyone help me put this alert info a textbox? Thankyou

[QUOTE]

<script type=”text/javascript”>

function nextDeliveryDate(){
var d = new Date();
var offset = d.getDay() != 6 ? 1000*3600*24 : 1000*3600*48;
d.setTime(d.getTime() + offset);
return d;
}
alert(nextDeliveryDate().toDateString());

</script>

<input type=”text” value=””>

[/QUOTE]

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@MalgrimMay 19.2009 — [CODE]<input id="date" type="text" value="">
<script type="text/javascript">
function nextDeliveryDate(){
var d = new Date();
var offset = d.getDay() != 6 ? 1000*3600*24 : 1000*3600*48;
d.setTime(d.getTime() + offset);
return d;
}
document.getElementById("date").value = nextDeliveryDate().toDateString();
</script>
[/CODE]
Copy linkTweet thisAlerts:
@MBCUKauthorMay 19.2009 — Great thankyou, I have another quiery too.. is there anyway I can get the script to alter at 3:00pm?
×

Success!

Help @MBCUK spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.4,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...