View Single Post
  #5  
Old 12-22-2009, 09:01 PM
Seapyramid Seapyramid is offline
Premium Member
 
Join Date: Feb 2009
Posts: 373
Gender: Female
Credits: 15,863
Seapyramid
Default RE: Javascript/Jquery not being run.

My pages have been greatly changed from the original script.. but this is an idea of how I have JS incorporated & where it is placed

PHP Code:
// Permissions
//**************************************************
// <editor-fold defaultstate="collapsed" desc="Permissions">
if ($isloggedin != 'yes') {
    
$article_title $accden "<br /><br />";
    
$article_content $reqlogin;
    
// **********************************************************************
    // Begin Template Definition
    // **********************************************************************
    //Define our current theme
    
$file $themeurl;
    
// Do the template changes and echo the ready template
    
$template file_get_contents($file);
    
$template str_replace(':ARTICLETITLE:',$article_title,$template);
    
$template str_replace(':ARTICLECONTENT:',$article_content,$template);
    
$template str_replace(':BROWSERTITLE:',$browsertitle,$template);
    
$template str_replace(':SITENAME:',$sitename,$template);
    echo 
$template;
    return;
    
// **********************************************************************
    // End Template Definition
    // **********************************************************************
}
// </editor-fold>
//**************************************************
// POST Info
//**************************************************
// <editor-fold defaultstate="collapsed" desc="POST Info">
$act $_POST["act"];
$rmto $_POST["rmto"];
$rmfrom $_POST["rmfrom"];
$ids $_POST["ids"];
$order $_POST["order"];
// </editor-fold>
// **********************************************************************
// End Prepwork - Output the page to the user
// This file lets a user mass move their adoptables...
// **********************************************************************
$article_content '<script type="text/javascript">
<!--
function SetAllCheckBoxes(FormName, CheckValue) {
    var myform = document.forms[FormName];
    for (var i = 0; i < myform.length; i++) {
        if (myform.elements[i].type == "checkbox") {
            if (CheckValue) {
                myform.elements[i].checked = CheckValue;
            } else {
                myform.elements[i].checked = "";
            }
        }
    }
}
// -->
</script>'
;
switch (
$act) { 
Reply With Quote