thenewperson Posted December 6, 2009 Share Posted December 6, 2009 Hey, wondering how i would return javascript from testing php page. Like for uploading, if the page with upload button is on is upload.php and the testing is on upload-file.php. How would i return javascript from upload-file.php. When i put javascript in upload-file.php it only works for that page but wont show it to the user on the upload.php file. Link to comment https://forums.phpfreaks.com/topic/184144-returning-javascript/ Share on other sites More sharing options...
thenewperson Posted December 6, 2009 Author Share Posted December 6, 2009 Well i want to return this message to the user from upload-file.php if the file they uploaded already exists if(file_exists($file)){ echo "<script type=\"text/javascript\">alert('This file already exists: Please rename your file');</script>"; } Link to comment https://forums.phpfreaks.com/topic/184144-returning-javascript/#findComment-972250 Share on other sites More sharing options...
BenInBlack Posted December 6, 2009 Share Posted December 6, 2009 this just scream AJAX, Check out www.jquery.com Link to comment https://forums.phpfreaks.com/topic/184144-returning-javascript/#findComment-972253 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.