Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5932051
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:46:51+00:00 2026-05-22T14:46:51+00:00

I need a bit of help here. I have some code which collects dates

  • 0

I need a bit of help here.

I have some code which collects dates and places them in a Calendar.

It works fine but I need 1 more thing, which is to add a link for each date.

Up to now I have hardcode a link and it works but I need to make each link to it’s own page.

This is my hardcoded link:

$('<div><a href="view-paginated.php#&ui-page=Event-Date--3-10-2011-0">' + today + '</a></div>')

The array holds just the dates, so it would contain this: “3-10-2011” .. without the quotes.

Here is the code which gets the dates and populates the Calendar:

<script>
Array.prototype.contains = function(element)  {
   for(var i=0;i<this.length;i++) if(this[i] == element) return true;
   return false;
};

//INITIALIZE DATES ARRAY SAME AS YOU DID BEFORE
var dates = [];

function ProcessDates(){    
  //ADD YOUR PAGE LOAD CODE HERE
  //NOT USING THIS
}

</script>


<?php 
    include('connect-db.php');
    $sql = mysql_query("SELECT * FROM tbl_calendar") OR DIE(mysql_error());

    echo "<script type='text/javascript'>";

    //LOOP THROUGH DB RESULTS AND PUSH TO JAVASCRIPT ARRAY
    while($row = mysql_fetch_array($sql)) {
        echo "dates.push('$row[date]');";
    }

        //DATES ARRAY SETUP COMPLETE.  CALL FUNCTION TO PROCESS DATES
    echo "ProcessDates(); </script>";
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:46:52+00:00Added an answer on May 22, 2026 at 2:46 pm

    Simply concatenate the name into the url as well, '<a href="page?date=' + today + '>' + today + '</a>'.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I need to integrate some legacy 32-bit code - for which I don't have
I need some help with floating point numbers...please! Here's the thing, I have code
I need some help understanding this bit of code pre { white-space: pre; white-space:
Help, I am a noob, just need some advice on this bit of code.
I need some help ... I'm a bit (read total) n00b when it comes
I am a bit new to sql and php so I need some help
I have some things to do, but is bit complicated for me.I need some
I'm a SQL noob, and I need a little bit of help understanding the
I need to write a bit of SQL which parses the second word of
I'm a newbie to programming and need some help with the set of fixers

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.