Results 1 to 2 of 2

Thread: if string changes then run some code?

  1. #1
    Fanatic Member
    Join Date
    May 09
    Posts
    868

    if string changes then run some code?

    Hi guys, I have a string that is echo'd on my PHP page

    $output_string

    and a piece of javascript updates $output_string with the current song being played on the radio, now is it possible to automatically run a piece of code everytime that $output_string changes?


    Regards
    Jamie.

  2. #2
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 08
    Location
    Trivandrum, Kerala, India
    Posts
    7,557

    Re: if string changes then run some code?

    You are mixing the JavaScript with PHP ! Once the page is echoed or displayed on the user's browser, what you get is the output of the PHP code! If you wish to communicate with the PHP page and dynamically change the contents, you could use AJAX. jQuery library has 3 or 4 AJAX extensions. Have a look at it.


    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD Athlon X2 5200+, ASUS Motherboard, 2 GB RAM, 400 GB HDD, Nvidia 8600 GT 512MB, 19.5" TFT(Wide), Creative 5.1 Home Theater

    Social Group: VBForums - Developers from India

    Skills: PHP, MySQL, jQuery, VB.Net, VB6, Photoshop...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •