Browsing articles tagged with "script javascript Archives - PHP Dev Tips"
Aug
11
2011
11
2011
Javascript // Tricks
JavaScript Close Window AND Refresh Parent
Earlier today I was working with complex PHP function to update values in a database, within a popout window.  The function worked flawlessly (naturally đŸ˜‰ ), however I was looking for a way to have immediate display feedback on the parent page. Enter the JavaScript close window refresh parent script… <a id="actions" href="#" onClick="window.close();window.opener.location.reload();">Close Window</a> Looking for more?  Sorry!  That’s it for this crafty little function.
Recent Snippets
- htaccess : Only allow access to specific wordpress upload types if logged in
- MySQL : Query WordPress Database for Invalid Media Filenames
- PHP : Get Actual IP Address with PHP
- JavaScript : Allow Tab in Textarea
- PHP : Clean sanitized database contents on output
- htaccess : Force www. prefix in URIs
- PHP : Force File Download with Correct Content Type
- Wordpress : Disable upgrade notification