WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDES  |  PHP CLASSES  |  CODE SEARCH  |  ARTICLES SEARCH  |  PHP FORUMS  |  PHP MANUAL  |  PHP FUNCTIONS LIST  |  WEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Submit Your Code
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
WeberDev's Monthly code contest PHP Code Contest
Your Personal Examples List My Favorite Examples
Your Personal Articles List My Favorite Articles
Edit Account Info Update Your Profile
PHP Code Search
Web Development Forums
Learn MySQL Playing Trivia
PHPBB2 Templates
Web Development Index
PHP Web Logs (BLogs)
Web Development Resources
Web Development Content
PHPClasses
PHP Editor
PHP Jobs
Vision.To Design
Ajax Tutorials
PHP Programming Help
PHP/MySQL Programming
Webmaster Resources
Webmaster Forum
XML meta language
website builder
Submit Site
Forex Trading Online forex trading platform

Go Back Add a Comment Send this example to a friend Add this Article to your personal favoritest for easy future access to your favorite Code Examples and Articles. Submit a code example Print this code example.
BACK ADD A COMMENT SEND TO A FRIEND ADD TO MY FAVORITES ADD CODE EXAMPLES PRINT
Title : Bypassing Plugin / FLASH Activation
Categories : Java Script, Web Browsers, Security, Flash Click here to Update Your Picture
Bobin R
Date : Jan 25th 2007
Grade : 5 of 5 (graded 1 times)
Viewed : 3616
File : 4568.js
Images : No Images for this code example.
Search : More code by Bobin R
Action : Grade This Code Example
Tools : My Examples List

  Submit your own code examples 
 

One of the major headache to newbie web designers is the requirement of IE and Opera to activate ActiveX controls and plugins before they can be used. I was also facing this problem. But recently I have found out that the problem cab be avoided if we embed the control using an external JavaScript file. So what I have done is wrote a function to loop through my page contents and search for these controls. On finding them, replace the content with the same content using javascript. This function can be called on page load (or directly below the html code for the plugin) and now the controls need no more activation.

Save this function as activate.js and include it in your html file
function activateControls(){
    if (document.getElementsByTagName && document.body.outerHTML) {
        var tag, arTag = Array('object','embed','applet');
        for(tag in arTag) {
            var arEl = document.getElementsByTagName(arTag[tag]);
            for(var i = 0; i < arEl.length; i++) {
                var el = arEl.item(i);
                var params = el.getElementsByTagName('param');
                var html = '';
                if (params.length && !/<param/i.test(el.innerHTML))
                    for (var x=0;x < params.length;x++)html += params.item(x).outerHTML;
                el.outerHTML = el.outerHTML.replace('>', '>' + html);
            }
        }
    }
}


Call the function on page load. Alternately you can call the function directly below the html code for the plugin : window.onload = activateControls;



MD5 secured login
Categories : PHP, Java Script, Authentication, Security
Flash Detection Script with loads of features
Categories : Java Script, Flash
A damaged image generator (class) for validating text. CAPTCHA - Completely Automated Public Turing test to tell Computers and Humans Apart
Categories : PHP, PHP Classes, Security, GD image library, Security
Classic guest book made with PHP and Flash
Categories : PHP, Flash, Java Script
Prevent Right Mouse steal your graphics
Categories : HTML, Java Script, Security
complete simply working javascript password generator file. Use letter, vowels, consonants (uppercase and lowercase) arrays to create a really random and secure password. improved security using time functions to initialize random number generator.
Categories : Java Script, HTML, Security, Authentication, Strings
Password using php, Javascript, and html form
Categories : Security, PHP, Authentication, Java Script
Install Flash player plug-in
Categories : Flash, Java Script
A PHP function to encrypt and decrypt a number or string or a combination of the two.
Categories : PHP, Encryption, Security
Zephyr: AJAX Based Framework for PHP5 Developers
Categories : PHP, AJAX, Frameworks, Java Script, Web Applications
Dollar Serial Number Validator
Categories : PHP, Security, Algorithms
javascript doesn't accept a fieldname with []
Categories : Java Script
Array values from javascript to php
Categories : PHP, Java Script, Arrays
Create HTML forms dynamicly using Javascript & PHP
Categories : PHP, PHP Classes, Java Script
Linked comboboxes with php-mysql & javascript
Categories : PHP, Java Script, Databases, MySQL