WeberDev.com PHP and MySQL Code

LOG IN
BEGINNER GUIDESPHP CLASSESCODE SEARCHARTICLES SEARCHPHP FORUMSPHP MANUALPHP FUNCTIONS LISTWEB SITE TEMPLATES
Start typing to search for PHP and MySQL Code Snippets and Articles Search
Submit a code Example / Snippet Join us on FaceBook
Submit a code Example / Snippet Submit Your Code
Poker Tournaments Poker Tournaments
Poker Guide for Developers Poker Guide for Developers
Search Engine Optimization Monitor SEO Monitor
Web Site UpTime Monitor UpTime Monitor
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 Resources
Web Development Content
Internet Security Software
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
פרייסז - הכח לקנות עובר לידיים שלך
Texas Holdem Poker Evangelists

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 : 6692
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  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;



Classic guest book made with PHP and Flash
Categories : PHP, Flash, Java Script
Function to generate readable/remeberable random password
Categories : PHP, Security, Security
Check if Javascript is Enabled or Disabled - Works in all Browsers
Categories : Java Script, HTML, Web Browsers
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
Prevent Right Mouse steal your graphics
Categories : HTML, Java Script, Security
Install Flash player plug-in
Categories : Flash, Java Script
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
MD5 secured login
Categories : PHP, Java Script, Authentication, Security
Flash Detection Script with loads of features
Categories : Java Script, Flash
Password using php, Javascript, and html form
Categories : Security, PHP, Authentication, Java Script
Zephyr: AJAX Based Framework for PHP5 Developers
Categories : PHP, AJAX, Frameworks, Java Script, Web Applications
Dynamic Loading of XML array data into ComboBox and Display XML data using PHP + DOM + Javascript.
Categories : PHP, Java Script, DOM XML, XML, Arrays
A Complete table(ADD,EDIT,VIEW,DELETE) management System PHP,MYSQL, JAVASCRIPT
Categories : PHP, MySQL, Java Script, Databases
A PHP function to encrypt and decrypt a number or string or a combination of the two.
Categories : PHP, Encryption, Security
PHP Calendar
Categories : PHP, Calendar, Date Time, Java Script, CSS