Hi there.
I have 0 AJAX experience and can't code anything from scratch so bear with me.
Basically I need AJAX to call a PHP file and the output needs to show up in the source.
Why? I have implemented a caching plugin for Wordpress and I need some existing php snippets in the sidebar to stay dynamic, BUT, they need to show up in the source for googlebot etc.
So, simple example would be something like this...
<script language="javascript" type="text/javascript">
XMLHttpRequest /example.php
</script>
And example.php would be
<?php
$myString = "<div id="aaa">Hello!</div>";
echo $myString;
echo "<div id="bbb">I love using PHP!</div>";
?>
And all that html needs to show up in the source code. This might be possible with just AJAX I realize, but I would like to keep my php code intact and not mess with AJAX.
Possible? If so, would anybody be so kind as to provide the proper code for the AJAX bit. I haven't been able to find any working example on the net thus far.
Thanks for your time.