开发者

pass starting variables to php

开发者 https://www.devze.com 2023-03-25 18:34 出处:网络
i am trying to have it so that w开发者_JAVA百科hen a page opens, it shows the current month and year in a div named display. there are 3 links, previous...reset...next. One click I want to reload the

i am trying to have it so that w开发者_JAVA百科hen a page opens, it shows the current month and year in a div named display. there are 3 links, previous...reset...next. One click I want to reload the content in the display div with the appropriate data...being next month...last month..etc.

I have the reset link working but I cannot figure out how to pass the month and year variables so the script knows where to go next. I also need it so that you can continually press the next or previous links to continue counting down or up. I know i need to add logic for months 1 and 12 to affect the years...but i need to figure out this part first as the year changes would be easy enough for me. heres a link to the code on a page http://www.intarsiaplans.com/thepage.php


All you now need to do is:

  1. Pass the current month and year as a part of the AJAX request, along with the type of request (next/previous)

  2. Grab that data in the backend and compute the response according to the parameters received. For example, if month=6, year=2011 and request_type="next", generate the calendar markup for 7/2011 and send it back to the browser.

  3. Replace the old calendar (that's what I assume you're trying to display) with the new one and also replace the values of the month and year on the page with the new ones.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号