Remote javascript..

Discussion in 'JavaScript' started by Scorpiono, Jan 13, 2007.

  1. #1
    Hello there,

    Could you kindly reffer me to any tutorial/online resource..

    I'm thinking of making a php script, that will extract something from a database and will be published on a webpage (simple)
    I want that each member on my site, to have a .js code, they will insert, and my php mysql query will be displayed on their site, remotely!

    Somehow like Google Adsense code for example, or any other .js type of script that will run a php code from another domain.

    Thank you kindly, I hope you understood
     
    Scorpiono, Jan 13, 2007 IP
  2. MattD

    MattD Peon

    Messages:
    161
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You could simply have a javascript file that invokes a remote PHP method asynchronously using the XMLHttpRequest object.

    e.g., javascript calls yoursite.com/script.php?doSomething and then recieves the response and displays it on your page.

    I cant post URLs yet, but search in Wikipedia for Ajax, and follow the links at the bottom of that page for the mozilla tutorial.
     
    MattD, Jan 14, 2007 IP
  3. Scorpiono

    Scorpiono Well-Known Member

    Messages:
    1,330
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    120
    #3
    You can PM the links though, anyway, thanks alot!
     
    Scorpiono, Jan 25, 2007 IP
  4. MattD

    MattD Peon

    Messages:
    161
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    MattD, Jan 26, 2007 IP