Login
Use as you please, there is no license on this script- I mean, come on! It's tiny!
At the same time, I cannot be held responsible for any mischief or general naughtiness
that this script causes.

Javascript Function to Run "OnLoad" scripts on Ajax calls

The crappy thing about html returned from ajax calls is that the returned html doesn't execute any javascript "onload" calls. This function is called on an ajax success AFTER the called html has been placed inside the ajax target div. The function finds any "onload" javascripts inside "script" tags and eval()'s them.  This is necessary for wysiwyg editor elements inside returned html from ajax calls as well as multilayer ajax calls. 
 
 
function core_activate_ajax_scripts(containerObject)
{
    childNodeArray = containerObject.childNodes;
   
    scripts = containerObject.getElementsByTagName("script");
    if(scripts.length>0)
    {
        for(var n=0;n
        {
            eval(scripts[n].innerHTML);
        }
    }
}
 
/////////////////////////
//example call
/////////////////////////
 
function getSelect(value,otherValue)
{
    // define url 
    var url = "/modules/Query-GFF/controllers/ajax/get_select.php";
   
    var response = new Ajax.Request( url,
    {
        method: "post",
        parameters:
            {
            'value': escape(value),
            'othervalue': otherValue
        },
        onSuccess: function(transport)
        {
            var result = transport.responseText;
           
            //create the target div object
            target_object = document.getElementById('my_target_div');
           
            //place the ajax returned html in the target div
            target_object.innerHTML = result;
           
            //execute any javascript elements that require an "onload""
            core_activate_ajax_scripts(target_object);
        }
    }
);
   
}

Basic PHP Framework Written in OOP

This is my first attempt at OOP from scratch. It's a basic framework with a basic CMS setup (though, no page admin is included).

Requirements:

PHP5.2+
MySQL 5.1+
Webserver

Download



Vertical Response List Scrubber

Script to scrub lists downloaded from Vertical Response of emails that have bounced ar unsubscribed. VR doesn't do this for you and I got really tired of PO'd customers that had unsubscribed calling

Requirements:

PHP4+
Webserver

Download

Home  • NeutralGood Blog  • Tech Blog  • Portfolio  • Resume  • Scripts  • Photos  • Contact
Phone: (240) 415-8721
http://www.kevinbruce.com · Site Modified Mar 15, 2013 · ©2013 Kevin Bruce | Designer of Web & Print
Follow me on LinkedIn Profile   Facebook   Twitter