473,387 Members | 1,535 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

A javascript for picture acording to date

I need a javascript forIE and firefox

I have all the pics with the name: my061129.gif, where 06 is the year, 11 the month and 29 the day, but I have pic since 1990 with this format. I need to select the date and automatically show that pic, If I select the date 12/23/2004, It must be shown the image called "my041223".

Some help?

I really will be very thanksfull for your help...
Nov 30 '06 #1
1 1074
r035198x
13,262 8TB
I need a javascript forIE and firefox

I have all the pics with the name: my061129.gif, where 06 is the year, 11 the month and 29 the day, but I have pic since 1990 with this format. I need to select the date and automatically show that pic, If I select the date 12/23/2004, It must be shown the image called "my041223".

Some help?

I really will be very thanksfull for your help...
get the date to string format say
"12/23/2004"

split this string to an array
using
string.split("/");

The array now holds three strings "12", "23", "2004"
Break up the last string using substring to leave it as "04"
Concatenate the strings to form the name of the image file
as in "my"+array[2] + array[1] + array[0] + ".gif";
Nov 30 '06 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Fabrizio | last post by:
I have just put a internet webcam that save every 30 seconds a picture via ftp. I have an html file that display this picture file (the name of the file is always the same and the webcam delete the...
1
by: ttamilvanan81 | last post by:
Hai everyone, i am new to javascript. Now i have doing one Image gallary application. In that application i have upload two images, one for Befor image and another one for after image. All...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.