PHP to Javascript refreshing issue

Discussion in 'PHP' started by unconame, Feb 22, 2007.

  1. #1
    I wrote a calendar script in php, since I was informed that the calendar was only going to show the current month's available days (more or less like a static image)...HOWEVER, earlier today I was informed that they would like to have prev and next buttons to change between the months.

    I have this working a 100% in php, but with the entire page refreshing every time they want to change the month. Is there a way to keep my php code and only refresh the calendar section of the page? The calendar section is currently pulled in as an include file.

    I know I have to use some javascript in order to accomplish this task, since PHP is server based, but I don't want to rewrite the whole thing in javascript if I don't have to.

    Thanks for any help someone can offer.
     
    unconame, Feb 22, 2007 IP
  2. klown

    klown Peon

    Messages:
    2,093
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You should be able to use an Iframe, however if you want to avoid using Iframes try downloading my ajax example file.. it ties in with php, results from the php file are placed into a div.
     
    klown, Feb 22, 2007 IP
  3. unconame

    unconame Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for showing me the ajax example, since that solved my problem and also gave me more insight on how I can develop better PHP programs.
     
    unconame, Feb 23, 2007 IP
  4. klown

    klown Peon

    Messages:
    2,093
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    0
    #4
    No problem, thats why this forum is here :)
     
    klown, Feb 23, 2007 IP