Jump to content

Confusion with PHP and JS i"integration"...

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
ZipOnTrousers

ZipOnTrousers

    Learning Programmer

  • Validating
  • PipPipPip
  • 94 posts
OK, so I have developed a web page that uses HTML, CSS and Javascript. All it does is create a page that shows a year view of any year's calendar, and then stores important dates in an array and on mouse over the dates show a tooltip with information on those dates. So the page has 12 different calendars displayed at the same time and the page can search through the array and based on the day and month variable decide if the date is important.

However, I have now been asked to edit the site so that the html file links to a PHP page, which uses a PHP variable to choose the month and then displays only a calendar for the specified month. What I'm confused with is how do these two interact? Can I just use PHP to get the variable to choose the month and then pass this variable into my javscript calendar function (the function that writes the HTML elements which make up the calendar and takes a month as an argument)? I'm guessing not but the way the task sounds makes it look like this is what is being asked.

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
1) form submission controlled by javascript
2) AJAX calls
3) PHP controls the month and initial variables, and javascript controls display features
4) something else?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog