Upload a file using PHP from thickbox window and pass the filename after successful upload with some jQuery code to the parent document.

PHP / jQuery modal upload

Enter a name, click Upload to select/upload a file.

DigitalOceanSSD Cloud Server from $5/month by DigitalOcean, simple cloud hosting, built for developers. Receive $10 in credits »
ServerPilotServerPilot is the best way to run WordPress and PHP sites on your DigitalOcean servers. First month free »

Click here to download the php example code and find here more information about the php upload script.