Tudy
10-26-2009, 11:23 AM
1) Script Title: Dynamic Ajax Content
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm
3) Describe problem:
a) the first problem is regarding the load of PHP pages into a div by using this script. I've read a lot of topics on this matter and it seems that other encountered this as well, but I've also seen that some people successfully used this script with php pages. I'm trying something simple here, a contact form with a submit button (the page phptest.php to be loaded in the "content" div):
<a href="javascript:ajaxpage('phptest.php', 'content');">Pag php</a>
The problem is that after clicking on the "Pag php" button the div "content" remains empty. It seems that the PHP code is not executed. Is there a sort of limitation of this script regarding the PHP pages or am I missing something else in the code?
b) the second problem is actually a question regarding the same script. I have a menu made with javascript. Is there any method to perform 2 actions when a button is clicked? What I mean exactly: when I click on "Home" button I want to fully reload the index.html page (not in the "content" div) and then to load in the "content" div the page 'test.html'. Is this possible in any way but just click only once on a button? The code for a button is the same like the line described at point a).
Any suggestions are welcomed!
Thank you in advance.
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm
3) Describe problem:
a) the first problem is regarding the load of PHP pages into a div by using this script. I've read a lot of topics on this matter and it seems that other encountered this as well, but I've also seen that some people successfully used this script with php pages. I'm trying something simple here, a contact form with a submit button (the page phptest.php to be loaded in the "content" div):
<a href="javascript:ajaxpage('phptest.php', 'content');">Pag php</a>
The problem is that after clicking on the "Pag php" button the div "content" remains empty. It seems that the PHP code is not executed. Is there a sort of limitation of this script regarding the PHP pages or am I missing something else in the code?
b) the second problem is actually a question regarding the same script. I have a menu made with javascript. Is there any method to perform 2 actions when a button is clicked? What I mean exactly: when I click on "Home" button I want to fully reload the index.html page (not in the "content" div) and then to load in the "content" div the page 'test.html'. Is this possible in any way but just click only once on a button? The code for a button is the same like the line described at point a).
Any suggestions are welcomed!
Thank you in advance.