Default All American 998 Posts user info edit post |
What I am trying to do is call on a js that will display the date within the heading of a blog-style entry. I know how to write the js to bring up the time/date, but I want it to automatically appear every time I use a particular tag. For example, when I use the <h3> tag, all I want to have to do it type the title of the entry - eg. Today is my lucky day!, but I want it to appear like this:
Today is my lucky day! Sunday 2:12 pm 04/02/2006
Can I use CSS to handle this? 4/2/2006 2:14:40 PM |
ZeroDegrez All American 3897 Posts user info edit post |
I'm just curious...but where are you pulling the date and time from to populate this entry? CSS isn't for scripting it's only for simple graphic change events, and fonts, borders, outlines, simple effects...etc.
If you're trying to populate a page with information from a database (the normal way blogs work) the tags they use in the template they give you are just interpreted by some template engine on the server's side so they know where to insert the title, data, text information.
What exactly is your javascript doing again? Getting the system time and date and displaying it?....so it changes every time i refresh the page?
[Edited on April 2, 2006 at 10:06 PM. Reason : mation] 4/2/2006 10:06:07 PM |
agentlion All American 13936 Posts user info edit post |
this sounds like a job for PHP or whatever platform your blog is running on. It would be a terrible misuse of normal HTML tags and CSS to have extra content displayed via JS based on an HTML tag.... if that's what you're trying to do 4/3/2006 3:46:33 AM |
robster All American 3545 Posts user info edit post |
but then again, thats sortof what Google does with its Maps API...
You have a div tag, and its automatically populated with the content straight from Google.
So, lets say it is a bad idea, but he still wants to try it.... How might he do that? 4/3/2006 7:04:01 AM |
Default All American 998 Posts user info edit post |
^, ^^ Yeah, I slowly found all this out I am by far not a web design expert, I am an amateur that does it as a pastime. Thanks for the info, and it looks like I will have to learn a little PHP now. 4/3/2006 7:07:24 AM |
Stein All American 19842 Posts user info edit post |
Quote : | "So, lets say it is a bad idea, but he still wants to try it.... How might he do that?" |
He would use JavaScript, since this isn't what CSS does.
All CSS does is make things look different.4/3/2006 11:23:07 AM |
FroshKiller All American 51913 Posts user info edit post |
I ACTUALLY USED TO HAVE A SHOCKWAVE OBJECT THAT BEHAVED IN THIS MANNER
YOU MIGHT WANT TO DO A YAHOO SEARCH FOR AN ACTIVEX IMPLEMENTATION
BUT MAKE SURE IT'S COMPATIBLE WITH 16-BIT PROCESSES 4/3/2006 2:50:12 PM |
pigkilla All American 2332 Posts user info edit post |
^ if you would have not posted a pic of your english degree, people would take you serious here in tech talk.
[Edited on April 3, 2006 at 3:15 PM. Reason : d] 4/3/2006 3:15:38 PM |
30thAnnZ Suspended 31803 Posts user info edit post |
Quote : | "looks like I will have to learn a little PHP now." |
very little.
getting it to display the dat and time is probably the EASIEST things you'll ever have to do with php4/3/2006 3:50:18 PM |
Default All American 998 Posts user info edit post |
Also, I have to figure out how to log the time so it will not keep refreshing everytime someone visits the page. Is it possible to make a simple database with MS Access to handle this? If not, what would be the best way to go about it? 4/3/2006 3:55:13 PM |
qntmfred retired 40818 Posts user info edit post |
you don't want to use access for web databases. why do you need to log the time anyways? can you give an example of what you're actually going to be doing?
[Edited on April 3, 2006 at 4:10 PM. Reason : .] 4/3/2006 4:10:15 PM |
Ernie All American 45943 Posts user info edit post |
this guy is making things ridiculously complicated 4/3/2006 4:21:01 PM |
ZeroDegrez All American 3897 Posts user info edit post |
Seriously man...just make an account with a normal blogger, ensapsulate the page in an iframe and you're good to go. Or since you are editing the entry by hand already, is it really that hard to just write out the time and date....I mean really.
I recommend doing #1, it's what I did, and it saved me a lot of trouble.
[Edited on April 4, 2006 at 2:21 AM. Reason : #1] 4/4/2006 2:09:58 AM |
Default All American 998 Posts user info edit post |
Quote : | "I am an amateur that does it as a pastime" |
4/4/2006 9:04:14 AM |