dcsimg
A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Call external PHP File with JavaScript

  1. #1

    Call external PHP File with JavaScript

    Im using a web analiser (http://www.web-script.com/analiser/) with works perfect by itself.

    I placed some JavaScript Code on my index.php, witch includes my swf file. (http://www.streetedge.nl/index.php)

    When a button is clicked, i want flash to open another php file (http://www.streetedge.nl/Hits/home.php) This file also includes the Javascript code, witch tells web analiser that someone visited Hits/home.php (or exually clicked the button home!). Al of this has to be done hidden, so the user wont see the home.php script is opend.

    I tried it with loadvars, and with load movie. Both won't work...

  2. #2
    Senior Member Branny's Avatar
    Join Date
    Feb 2001
    Location
    Manchester/UK
    Posts
    512
    you have to include the php file in the page where your flash resides

    <? include("filename.php") ?>

    in your home page or where ever.

    then to get the values you want out of the php, declare some variables and then to put them in flash, include them as querystrings when calling the flash.

    remember that the flash file is called twice so you have to use the same querystring on both calls.

    so in your object tag ........./yourfile.swf?value=<?yourphpvariable?>

    is that what your after??

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center