I have a challenge for anyone interested.
I have a system that will post announcements stored in a database.
I then have tags that I can insert into HTML to indicate where I want that code inserted. I then have two layouts I can create using HTML and these tags… a list layout and a detail layout.
One of the tags renders the date of the announcement in the following format 20-Jul-2009
What I am wanting to do is strip away the Day and the Month from the rendered text and insert the day in one place and the month in another… so the browser renders the following…
This code renders what you see above
You can now write about your latest news, announcements and much m.
The CSS for these classes are
Any ideas as to how I can copy the day and months from the hidden text into the new places?
So i have been reading up on jQuery a bit more… to be honest it is hard for my mind to wrap around…
if I put a string of text like such…
Can I create some jQuery code that will virtually erase everything after the 20?
Then if I had that same string of text but displayed as such…
Can I have another line of script that will erase the 20- and the -2009?
I was looking at http://docs.jquery.com/Manipulation where it talks about Changing and Removing Content and am wondering if i am in the right area or even on the right track?
Thank you in advance for any help on the matter
So i have this right you already can print the date with the following format 20-Jul-2009
is that is true then just use a diffrent date format
http://blog.stevenlevithan.com/archives … ent-page-3
To clarify, you have a database and there are three fields for each item, "Title" + "Date" + "Description".
The problem is that you need to split the "Date" field into three distinct pieces, and you are having trouble accomplishing this using JS and/or JQuery.
Is this all correct?
I am using a CMS called Business Catalyst. it is great for guys like me that have a hard time working with php.
When i create an announcement in the announcement module. i enter a date by picking it from a date picker (much like a mini calendar)
then i tell the system where i want that Date to be displayed. the system tag I sue for this is
When the page is rendered in a browser it shows 20-Jul-2009 or what ever date was entered.
All I want to do is take that tag ans strip away the unwanted text. In one case i just want the day and in another case i just want the month. the year is not important to me.
i had some help from a user here who was able to pull some numbers out of a tag and insert it into a new field using jQuery. I am not sure how he did it.
You must be logged in to reply to this topic.
*May or may not contain any actual "CSS" or "Tricks".