Mysidia Adoptables Support Forum  

Home Community Mys-Script Creative Off-Topic
Go Back   Mysidia Adoptables Support Forum > Mysidia Adoptables > Questions and Supports

Notices

Reply
 
Thread Tools Display Modes
  #1  
Old 12-21-2009, 03:24 AM
exactly33 exactly33 is offline
Member
 
Join Date: Dec 2008
Posts: 18
Credits: 4,037
exactly33
Default Javascript/Jquery not being run. [Answered]

Although, meddling with HTML/PHP and Javascript for the past few years, I have never understood why they wouldn't execute on certain pages. Ones that seemed to be pre-rendered through php or some other process would never run the animated jquery actions. I have attempted to place a few fancy Jquery applications inside my page and was rather disappointed when none of them would render. Of course, the website isn't fully completed but I would like some help. :D

http://adopt.universe-9.com/

Problems:
The banner should scroll as if on a cylinder (the blue clouds).
The menu should have an image sliding back and forth behind the text.

Thanks in advance.
Justin
Reply With Quote
  #2  
Old 12-21-2009, 12:35 PM
exactly33 exactly33 is offline
Member
 
Join Date: Dec 2008
Posts: 18
Credits: 4,037
exactly33
Default RE: Javascript/Jquery not being run.

I've uploaded the original template file, where the javascript is working.
http://adopt.universe-9.com/templates/default/original.html

Thanks again. :D
Reply With Quote
  #3  
Old 12-21-2009, 02:12 PM
Seapyramid Seapyramid is offline
Premium Member
 
Join Date: Feb 2009
Posts: 373
Gender: Female
Credits: 15,576
Seapyramid
Default RE: Javascript/Jquery not being run.

Quote:
Originally Posted by exactly33
I've uploaded the original template file, where the javascript is working.
http://adopt.universe-9.com/templates/default/original.html

Thanks again. :D
JS is normally iniciated in the <head></head> PHP pages don't have that area for the JS to be started. It is possible to use JS in php but is done in a bit different process to enable it.
Reply With Quote
  #4  
Old 12-22-2009, 06:39 PM
exactly33 exactly33 is offline
Member
 
Join Date: Dec 2008
Posts: 18
Credits: 4,037
exactly33
Default RE: Javascript/Jquery not being run.

Right, dynamically loading it? How would I go about doing this? Would echoing work, so as to have it load on the front end?

Help? :P
Reply With Quote
  #5  
Old 12-22-2009, 09:01 PM
Seapyramid Seapyramid is offline
Premium Member
 
Join Date: Feb 2009
Posts: 373
Gender: Female
Credits: 15,576
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
  #6  
Old 12-23-2009, 11:39 AM
exactly33 exactly33 is offline
Member
 
Join Date: Dec 2008
Posts: 18
Credits: 4,037
exactly33
Default RE: Javascript/Jquery not being run.

Thanks so much for your help. :P

Of course, a noob solves his own questions. I realized that the actual template would be rendered in the root rather than in the template directory, thus effectively disallowing the template to actually load the external javascript. It couldn't find the resources. ^.^

Thanks anyways.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
jQuery and Mysidia: A struggle IntoRain Questions and Supports 11 02-05-2014 03:58 PM
jQuery - Spiffing up your page where you can't edit the HTML! Kyttias Tutorials and Tips 3 01-29-2014 06:09 PM
\\Javascript Help, Please// Poppy Questions and Supports 0 11-06-2011 11:28 AM
Jquery one weekend? Tony Other Chat 0 07-30-2011 06:34 PM
Anyone here knows Javascript? Hall of Famer Other Chat 5 04-06-2011 07:21 PM


All times are GMT -5. The time now is 07:50 AM.

Currently Active Users: 9736 (0 members and 9736 guests)
Threads: 4,080, Posts: 32,024, Members: 2,016
Welcome to our newest members, jolob.
BETA





What's New?

What's Hot?

What's Popular?


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
vBCommerce I v2.0.0 Gold ©2010, PixelFX Studios
vBCredits I v2.0.0 Gold ©2010, PixelFX Studios
Emoticons by darkmoon3636