I think the error is below, it seems to not be taking working at the bit id=".$_GET['id']. as it isnt finding it perhaps jue to the uniqe way it works, but if the id is typed in manually in the browser when you open the frame out on its own http://www.test.jennifersplaygroup.co.uk/includes/story_comments.php?id=%s this is the raw result but if you manually type in the story id you get http://www.test.jennifersplaygroup.co.uk/includes/story_comments.php?id=55
Code:<?php print "<IFRAME SRC=\"includes/story_comments.php?id=".$_GET['id']."\" width=\"100%\" height=\"325\" frameborder=\"0\" name=\"topiframe\"></IFRAME><br />"; ?> <br /> <a href="javascript:ajaxpage('includes/newcomment.php', 'addnew');">Add new comment</a> <div id="addnew"> </div>
I am having a difficult time following what error you are still getting, and what the relevant bits of code are. But if you are still having the issue where the id is not passed to the new comment script, this may help...
If I am following correctly, you are using the following anchor tag to add a new comment:
Code:
<a href="javascript:ajaxpage('includes/newcomment.php', 'addnew');">Add new comment</a>
And the file newcomment.php contains the following code loaded in an iframe:
Code:
<?php
print "<IFRAME SRC=\"includes/storys_comment.php?id=".$_GET['id']."\" width=\"100%\" height=\"275\" frameborder=\"0\" name=\"bottomiframe\"></IFRAME>";
?>
Code:
<a href="javascript:ajaxpage('includes/newcomment.php?id=<?php print $id; ?>', 'addnew');">Add new comment</a>
Note, this will only work if the file which calls the anchor tag has $id set. You may have to use this instead.
Code:
<a href="javascript:ajaxpage('includes/newcomment.php?id=<?php print $_GET['id']; ?>', 'addnew');">Add new comment</a>
I hope this helps.