Welcome Guest, Not a member yet? Register   Sign In
How can I refresh a partial page?
#1

[eluser]Frank Rocco[/eluser]
Hello,

I just want a section of PHP code to execute, and refreshing the whole page is distracting.

What is the best way?

Example please.

Thanks
#2

[eluser]d1a8lo24[/eluser]
You're not able to accomplish this with PHP it self. You need to use JavaScript to replace section on a page with new content.

Will not do a code example since I am not that good in JavaScript so I hope I can guide you on what you need to do.

To make it easier use jQuery.

1. Create your controller with the function and the data that needs to spit out.

2. Use jQuery and the $.get() function to get the new content either in raw html, jason, or xml.

3. Use jQuery to now replace the section you want with the new content.

If some one has the time will probably help you with the code.

This is pretty much how you accomplish what you want.

Technologies for this type of information retrieval are JavaScript, Flex, Flash in conjunction with php, colfusion, asp etc...




Theme © iAndrew 2016 - Forum software by © MyBB