Jump to content

Recommended Posts

Thanks thorpe. I am trying to see if I can get around refreshing the page everytime I want the new php function to appear. For instance I am using rand(1,31). In order for the new random item to appear a page refresh needs to be done. I either need a way that just part of the page can be refreshed or I need a way that javascript can re-execute my php script. Or another way if someone has one. Or can something be put in this so the function only re-executes? echo "<img src='/$imagefile'>I need search engines to be able to search my php content, so I can't use iframes or enclose the php inside the javascript.

Reason why page refresh isn't working is because it has to refresh the whole page which disrupts everything when I need to do it often. Same problem happens when server side include calls the page with the refresh in it. I only need something small in php refreshed, not the whole page. Some wizard out there please let me know, thanks.
In this instance, coincidently, it is probably AJAX that you're after for this task, but as Thorpe mentioned earlier, this isn't always the case.

I'd suggest visiting PHP Freaks sister site, [url=http://www.ajaxfreaks.com/]AJAX Freaks[/url] for beginner tutorials on this sort of thing.

Regards
Huggie
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.