11Tami Posted November 17, 2006 Share Posted November 17, 2006 Hello, I was wondering if I could put an id into a php script somehow so that I can call on it separately with javascript. Please let me know, thank you very much. Quote Link to comment https://forums.phpfreaks.com/topic/27642-is-it-possible-to-give-php-and-id/ Share on other sites More sharing options...
trq Posted November 17, 2006 Share Posted November 17, 2006 You'll need to be allot clearer in your description of what it is your trying to do. Quote Link to comment https://forums.phpfreaks.com/topic/27642-is-it-possible-to-give-php-and-id/#findComment-126422 Share on other sites More sharing options...
Psycho Posted November 18, 2006 Share Posted November 18, 2006 The only way to "call" php using javascript would be AJAX. You probably need to look into that. Quote Link to comment https://forums.phpfreaks.com/topic/27642-is-it-possible-to-give-php-and-id/#findComment-126432 Share on other sites More sharing options...
trq Posted November 18, 2006 Share Posted November 18, 2006 [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. Quote Link to comment https://forums.phpfreaks.com/topic/27642-is-it-possible-to-give-php-and-id/#findComment-126436 Share on other sites More sharing options...
11Tami Posted November 22, 2006 Author Share Posted November 22, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/27642-is-it-possible-to-give-php-and-id/#findComment-128456 Share on other sites More sharing options...
HuggieBear Posted November 22, 2006 Share Posted November 22, 2006 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.RegardsHuggie Quote Link to comment https://forums.phpfreaks.com/topic/27642-is-it-possible-to-give-php-and-id/#findComment-128478 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.