the getData is in my head. I added it into the question.
–
JoelFeb 20 '10 at 19:58

Re your update: Well, this is probably going to be a case for step-by-step debugging. Are your variables correct, are you getting the right data in the right places... You can use a debugger, or just make test echo outputs.
–
Pekka 웃Feb 20 '10 at 21:41

That makes sense...I need the php code there to build the calendar that will populate the div contents being replaced. Can you point me to something that would show me how to do this?
–
JoelFeb 20 '10 at 20:11

If your hoping to process the php in the browser you can't.
–
Paul CreaseyFeb 20 '10 at 20:30

I'm just hoping to make this work. What can accomplish this?
–
JoelFeb 20 '10 at 20:40

First off, you shouldn't pull <script> elements via Ajax, they are not going to be interpreted and if they are, they are going to break everything on the second request.

Do some debugging by calling /Dev2/includes/view-monthly-calendar-ajax.php in your browser first. Check out the source code of what you are getting. PHP runs before the document is delivered, so there is no way to pull the HTML, but not the contents generated by PHP. They are one entity.

You either have an error in your PHP code that leads to the wrong output, or your PHP code is not being interpreted at all, which is easy to spot because the original PHP source code will be in the document's source code (which must never, ever happen).

I can move those scripts to the main page header, so that's no problem. When I load /Dev2/includes/view-monthly-calendar-ajax.php in my browser, I get the exact same source code that I put there in my question (the one with no php). The problem is that I'm needing to interperate that php in order to build the monthly calendar when calling it via ajax...EDIT: I know that the actual code works because I am using it now in a separate page-I'm just trying to use ajax to not have to navigate to this new page and instead just replace the contents.
–
JoelFeb 20 '10 at 20:07

In your PHP code, you are running a loop ` for($i = 1; $i < $numDays+1; $i++, $counter++)` Where does $numDays come from? Because if that is not set or zero, the loop won't run once.
–
Pekka 웃Feb 20 '10 at 20:19

well even if I add a $numDays = 0; things don't seem to change. I have a feeling that Paul Creasey is on the right track that I need to have the ajax call implement another page to load the php information and then load that? I just need to figure out how the heck to do that now...
–
JoelFeb 20 '10 at 20:47

Gladly. :) My output doesn't change, unfortunately. I'm sure this is a simple thing I'm missing, but I'm still too new at this to fully "get it". Because this is a more complex problem that the singular issues I usually try and address here, I'm going to add the full index page of this to see if there is something obvious...I hope no-one minds!
–
JoelFeb 20 '10 at 20:58

PHP is preprocessed before the data is sent to the client. The server parses and executes the php code and only sends what is output by the code. If you want to get the full file you would need to have it not processed by php, for instance by renaming the file extension to something else.