Jump to content

Is it possible to give php and id?


11Tami

Recommended Posts

[quote]The only way to "call" php using javascript would be AJAX.[/quote]

Thats not so at all. You can easily request a php page with Javascript, I think its best to see if {,s}he can give us a cleaer explination before jumping to conclusions.
Link to comment
Share on other sites

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.
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.