Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Jan 2003
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Hyperlinking based on the date selected

    Hi
    I am looking for code that does the following:
    On daily basis I am recording a morning call and the output name is saved based on the date of that recording, the file name wil be for example 20030114.mp3 because recording was on that day.

    I would like to have page with a month view calendar, when user click on a day, the hyperlink should be pointed to the file of that day, for example if user click on 01/15/2003, then sound file name 20030115.mp3 should work.

    I hope I get this code here with manay thanks in advance.
    JJ

  • #2
    Regular Coder
    Join Date
    Jun 2002
    Posts
    626
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You could do something like this:
    <HTML>
    <HEAD>
    <TITLE>Test</TITLE>
    <SCRIPT LANGUAGE="JavaScript">
    function getfile(fdate)
    {
    myfile=fdate+".mp3"
    alert(myfile)
    }
    </SCRIPT>
    </HEAD>
    <BODY>
    <A HREF="javascript:getfile('20030115')">Click Here</A><BR>
    <A HREF="javascript:getfile('20030114')">Click Here</A>
    </BODY>
    </HTML>

    This passes the date only to the function which tacks on the file extension.

  • #3
    New to the CF scene
    Join Date
    Jan 2003
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks for your reply
    I tried it and it popup a message box with the date mentioned below + the extention defined in the function, what actualy I am looking for is the date to be extracted from the system, so when user click on January 1, 2003 in the month calendar, the link directly goes to the same date name file which will be 20030101.mp3
    Hoping I could make my question more clear.
    Appreciate your reply

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    197
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Animation Rule #64
    Poor quality images are often artistic,
    Poor quality sound is ALWAYS annoying.

  • #5
    New to the CF scene
    Join Date
    Jan 2003
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have do a small change to the code at the end lines by entering the string today and now when clcik on the link on today for example 01/17/2003, the pop up message will read 17.mp3, this great approach for me at least, I wonder if ther is other value for the current year and current month to get all the date:
    <HTML>
    <HEAD>
    <TITLE>Test</TITLE>
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    function getfile(fdate)
    {
    myfile=fdate+".mp3"
    alert(myfile)
    }
    </SCRIPT>
    </HEAD>
    <BODY>
    <A HREF="javascript:getfile(today)">Click Here</A><BR>
    <A HREF="javascript:getfile(today)">Click Here</A>
    </BODY>
    </HTML>

    ez4ne12c
    Thanks for the link, I will give it a try and hope meet my requirement.
    Thanks
    Last edited by JJBrady; 01-16-2003 at 08:49 AM.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •