And you can even pass back status information by say, sending a 404 header and exiting. This makes the javascript believe the image was not found, so it triggers an onerror() handler. It would have triggered an onload() handler if you sent a real image.
There you got a pretty neat state machine, which I use on a couple of sites to trigger late-delayed information transfer when an ActiveX object has initialised.
Cheers - Neil Smith.
Subject: Re: [PHP-WIN] how do i send a request by pressing a button
You have a load of options but all depend on either frames, iframes or url's or anything that has the ability to call a file from the server like flash, java and the like... You need a technology that allows you to transpose from the client-side - the browser - to the server side - the php page.
With frames, you can point a form submit button to a page that opens the php file that creates the file on the server and then presents the success and or insuccess of it.
With iframes, you can use javascript to change the source document of the iframe to the same php file. The same goes to replace the source of an image (which can be changed to the same page, if the page in the end sends correctly an image).
With java and flash you can do the same... In flash for instance, you can either process it directly by making the button a flash file, or using javascript to order flash to do get the php page (and thrus creating your file)...
There are much more options ;)
Cheers, Luis Ferro
-- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php