Current location: Hot Scripts Forums » Programming Languages » PHP » PHP with a 'JavaScript-ish' Image Display


PHP with a 'JavaScript-ish' Image Display

Reply
  #1 (permalink)  
Old 07-02-04, 11:29 PM
Cypris Cypris is offline
New Member
 
Join Date: Jul 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
PHP with a 'JavaScript-ish' Image Display

My Question is, In PHP, is there a way to "Refresh" an image, without an iFrame, without reloading the page, or any code for that matter. When i say javascript-ish, i mean one that doesnt require a reload of the page, JavaScript can do this. Can PHP? Thinking about it, i dont see how, but if theres a way, could someone explain to me how to do it.

-Cypris
Reply With Quote
  #2 (permalink)  
Old 07-03-04, 03:05 AM
blaw's Avatar
blaw blaw is offline
Junior Code Guru
 
Join Date: Dec 2003
Location: Vancouver, BC, Canada
Posts: 550
Thanks: 0
Thanked 0 Times in 0 Posts
Hi there,

Quote:
JavaScript can do this. Can PHP?
To answer your question, no, you cannot dynammically load any files or modify codes with PHP after the page is loaded without reloading the page. PHP works on server-side whereas JavaScript works on client-side. That means once the page is loaded, PHP's task is done, and it doesn't do anything until the next page load. As for JavaScript, it cannot do anything before the page is loaded, but after that (even onLoad event cannot be triggerred before PHP says "I'm done.") because the JavaScript is to be "loaded" within your browser to do what it's programmed to, and PHP is the one that sends to the browser what should be loaded.

They are two different things, and it is important that you understand when to use PHP or JavaScript (Server-side/Client-side scripting), as they can be extremely powerful when combined in a complementing way.

My 2 cents.
__________________
Blavv =|
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
execute php into javascript function Hagoromo PHP 3 05-23-07 02:19 AM
Delete an image with php mdhall PHP 3 04-22-04 03:24 PM
how can i use javascript in PHP sfaizanh PHP 3 01-25-04 01:31 PM
php and javascript together? gamextremer2003 PHP 5 11-06-03 02:18 PM
Need help on a image slide show using php! xelanoimis PHP 2 10-16-03 06:51 PM


All times are GMT -5. The time now is 05:08 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.