/    Sign up×
Community /Pin to ProfileBookmark

Auto populate based on date

Hi,
I’ve created a table based calendar.The user clicks on a date and it populates an empty cell with information. How do I get an empty cell to populate automatically based on a date and using information contained in a div tag? I would like this cell to fill in automatically based on whatever today’s date is. I’m using div tags and the following javascript to basically turn div tags on and off:

<script language=”JavaScript”>
function expand(param)
{param.style.display=(param.style.display==”none”)?””:”none”;}
function RemoveContent(d) {
document.getElementById(d).style.display = “none”;
}
</script>

Below is the div tag placed in empty cell:

<div id=”div3″ style=”display:none” >People out on Sept 3</div>

Code placed in cell for September 3 to reveal div tag:

<td align=”center” <a href=”javascript:expand(document.getElementById(‘div4’))”><b>3</b></a></font></td>

Thanks for any help you can give me.

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @pauly 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.19,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

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