Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Need to update date code mm/dd/yyyy in in several webpages without using code

Need to update date code mm/dd/yyyy in in several webpages without using code

Problem

I need to get the date from the server in mm/dd/yyyy without any javascript or asp Code. I would prefer to do this as either a link that flows in the current document frame and that also injects the mm/dd/yyyy into the current html web page as css or other non code based solution. I don't want to use any extraneous querying languages like xslt, xquery, or plinq either.

example:

Date:

output:

Date:06/26/2012

Problem courtesy of: RetroCoder

Solution

as he others say you cannot achieve this without at least a bit of javascript. what you could do is use jquery to select all your date tags and then post an ajax to get the current date in your preferred format.

like so:

    

Date:

then on ullu.asp:


DateTime is here a class of mine for formatting dates you could use your own implementation... Furthermore you could add another attribute to your tag like "src" to send your ajax there.

i know you wanted to do this without "using code" but that is not possible. with this solution you only have to add a bit of javascript which handles all your tags...

Solution courtesy of: ulluoink

Discussion

View additional discussion.



This post first appeared on CSS3 Recipes - The Solution To All Your Style Problems, please read the originial post: here

Share the post

Need to update date code mm/dd/yyyy in in several webpages without using code

×

Subscribe to Css3 Recipes - The Solution To All Your Style Problems

Get updates delivered right to your inbox!

Thank you for your subscription

×