Page 1 of 2 12 LastLast
Results 1 to 10 of 15
  1. #1
    Join Date
    Jul 2008
    Posts
    192
    Plugin Contributions
    0

    Default Embed Javascript into ez page

    I'm trying to embed the code below into an ez page but just can't get it to work. I have all the files in my root directory and it works fine in an html page...

    This is the code as it appears in the .html page

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <!-- saved from url=(0014)about:internet -->
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="cache-control" content="no-cache">
    <meta http-equiv="expires" content="0">
    <meta http-equiv="expires" content="Sun, Dec 31 1970 12:00:00 GMT" />
    <meta http-equiv="pragma" content="no-cache">
    
    <title>BananAlbum</title>
    
    <script type="text/javascript" src="res/scripts.js"></script>
    <script type="text/javascript" src="res/swfobject.js"></script>
    <link rel="stylesheet" href="res/styles.css" type="text/css" charset="utf-8"></link>
    
    </head>
    <body bgcolor="#eeeeee">
    
    <!-- Rudin Swagerman -->
    <!-- thegreatesthits.net -->
    <!-- 2007 -->
    
    <!-- BananAlbum.net -->
    
    	<div id="flashcontent">
    
    	<noscript>
    	<a href="http://www.bananalbum.com/go/enablejavascript/"><img src="res/PleaseEnableJavascript.gif"/></a>
    	</noscript>
    
    	<script type="text/javascript">
    		document.write("<a href=\"http://www.bananalbum.com/go/getflash/\"><img src=\"res/PleaseUpdateFlashPlayer.gif\"/></a>");
    	</script>
    	</div>
    	
    	<script type="text/javascript">
    		// <![CDATA[
    		
    	document.title = "Gallery";
    	bgcolor = "#eeeeee";
    	imgcolor = "#ffffff";
    	linecolor = "#000000";
    	txtcolor = "#000000";
    
    		respath = "res/";
    		var so = new SWFObject("res/BananAlbum.swf", "BananAlbum", "100%", "100%", "8", "#eeeeee");
    		so.addVariable("jalbum", "true");
    		so.addVariable("bgcolor", bgcolor.replace("#","0x"));
    		so.addVariable("imgcolor", imgcolor.replace("#","0x"));
    		so.addVariable("linecolor", linecolor.replace("#","0x"));
    		so.addVariable("txtcolor", txtcolor.replace("#","0x"));
    		so.addParam("allowFullScreen", "true");
    		so.write("flashcontent");
    		
    		// ]]>
    	</script>
    
    </body>
    </html>
    Help will be appreciated!

  2. #2
    Join Date
    Jul 2008
    Posts
    192
    Plugin Contributions
    0

    Default Re: Embed Javascript into ez page

    Ok, after I've done some research I added the <script> between the <head> tahs inside the html_header file... and the rest in the ez page

    Why does the <script> in the ez page collapse if I safe the the ez page. Just the <script> tags stay...

  3. #3
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Embed Javascript into ez page

    Link to url where this is happening would help...

  4. #4
    Join Date
    Jul 2008
    Posts
    192
    Plugin Contributions
    0

    Default Re: Embed Javascript into ez page

    Quote Originally Posted by misty View Post
    Link to url where this is happening would help...
    Thanks, do you have the link?

  5. #5
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Embed Javascript into ez page

    Quote Originally Posted by rooisnor View Post
    Thanks, do you have the link?
    NO, you have link to your site where problem is happening..

  6. #6
    Join Date
    Jul 2008
    Posts
    192
    Plugin Contributions
    0

    Default Re: Embed Javascript into ez page

    Quote Originally Posted by misty View Post
    NO, you have link to your site where problem is happening..
    ok.. I see, but you won't see the problem on the site itself, it happens within the admin...

  7. #7
    Join Date
    Jul 2008
    Posts
    192
    Plugin Contributions
    0

    Default Re: Embed Javascript into ez page

    If I tries to embed the code below into the ez page

    Code:
    <body bgcolor="#eeeeee">
    
    <!-- Rudin Swagerman -->
    <!-- thegreatesthits.net -->
    <!-- 2007 -->
    
    <!-- BananAlbum.net -->
    
    	<div id="flashcontent">
    
    	<noscript>
    	<a href="http://www.bananalbum.com/go/enablejavascript/"><img src="videos/res/PleaseEnableJavascript.gif"/></a>
    	</noscript>
    
    	<script type="text/javascript">
    		document.write("<a href=\"http://www.bananalbum.com/go/getflash/\"><img src=\"videos/res/PleaseUpdateFlashPlayer.gif\"/></a>");
    	</script>
    	</div>
    	
    	<script type="text/javascript">
    		// <![CDATA[
    		
    	document.title = "Gallery";
    	bgcolor = "#eeeeee";
    	imgcolor = "#ffffff";
    	linecolor = "#000000";
    	txtcolor = "#000000";
    
    		respath = "video/res/";
    		var so = new SWFObject("videos/res/BananAlbum.swf", "BananAlbum", "100%", "100%", "8", "#eeeeee");
    		so.addVariable("jalbum", "true");
    		so.addVariable("bgcolor", bgcolor.replace("#","0x"));
    		so.addVariable("imgcolor", imgcolor.replace("#","0x"));
    		so.addVariable("linecolor", linecolor.replace("#","0x"));
    		so.addVariable("txtcolor", txtcolor.replace("#","0x"));
    		so.addParam("allowFullScreen", "true");
    		so.write("flashcontent");
    		
    		// ]]>
    	</script>
    ...after I saved the page I get this...

    Code:
    <!-- Rudin Swagerman --><!-- thegreatesthits.net --><!-- 2007 --><!-- BananAlbum.net --><div id="flashcontent"><noscript /><script type="text/javascript"></script></div><script type="text/javascript"></script>
    It seems like the entire script collapes... I tried everything... this happens inside the admin

  8. #8
    Join Date
    Apr 2004
    Location
    UK
    Posts
    5,821
    Plugin Contributions
    2

    Default Re: Embed Javascript into ez page

    Try just posting
    Code:
    <div id="flashcontent">
     
        <noscript>
        <a href="http://www.bananalbum.com/go/enablejavascript/"><img src="videos/res/PleaseEnableJavascript.gif"/></a>
        </noscript>
     
        <script type="text/javascript">
            document.write("<a href=\"http://www.bananalbum.com/go/getflash/\"><img src=\"videos/res/PleaseUpdateFlashPlayer.gif\"/></a>");
        </script>
        </div>
     
        <script type="text/javascript">
            // <![CDATA[
     
        document.title = "Gallery";
        bgcolor = "#eeeeee";
        imgcolor = "#ffffff";
        linecolor = "#000000";
        txtcolor = "#000000";
     
            respath = "video/res/";
            var so = new SWFObject("videos/res/BananAlbum.swf", "BananAlbum", "100%", "100%", "8", "#eeeeee");
            so.addVariable("jalbum", "true");
            so.addVariable("bgcolor", bgcolor.replace("#","0x"));
            so.addVariable("imgcolor", imgcolor.replace("#","0x"));
            so.addVariable("linecolor", linecolor.replace("#","0x"));
            so.addVariable("txtcolor", txtcolor.replace("#","0x"));
            so.addParam("allowFullScreen", "true");
            so.write("flashcontent");
     
            // ]]>
        </script>
    Make sure paths to needed files are correct..

  9. #9
    Join Date
    Jul 2008
    Posts
    192
    Plugin Contributions
    0

    Default Re: Embed Javascript into ez page

    Quote Originally Posted by misty View Post
    Try just posting
    Code:
    <div id="flashcontent">
     
        <noscript>
        <a href="http://www.bananalbum.com/go/enablejavascript/"><img src="videos/res/PleaseEnableJavascript.gif"/></a>
        </noscript>
     
        <script type="text/javascript">
            document.write("<a href=\"http://www.bananalbum.com/go/getflash/\"><img src=\"videos/res/PleaseUpdateFlashPlayer.gif\"/></a>");
        </script>
        </div>
     
        <script type="text/javascript">
            // <![CDATA[
     
        document.title = "Gallery";
        bgcolor = "#eeeeee";
        imgcolor = "#ffffff";
        linecolor = "#000000";
        txtcolor = "#000000";
     
            respath = "video/res/";
            var so = new SWFObject("videos/res/BananAlbum.swf", "BananAlbum", "100%", "100%", "8", "#eeeeee");
            so.addVariable("jalbum", "true");
            so.addVariable("bgcolor", bgcolor.replace("#","0x"));
            so.addVariable("imgcolor", imgcolor.replace("#","0x"));
            so.addVariable("linecolor", linecolor.replace("#","0x"));
            so.addVariable("txtcolor", txtcolor.replace("#","0x"));
            so.addParam("allowFullScreen", "true");
            so.write("flashcontent");
     
            // ]]>
        </script>
    Make sure paths to needed files are correct..
    Yes, I checked.. all files point to /video/ folder...

  10. #10
    Join Date
    Jul 2008
    Posts
    192
    Plugin Contributions
    0

    Default Re: Embed Javascript into ez page

    Isn't this 'collapse' caused by the actual embedding of the script? I've tried various variations of embedding but it still appears to collapse!

 

 
Page 1 of 2 12 LastLast

Similar Threads

  1. v151 Embed flash gallery into a new page
    By gazag in forum Templates, Stylesheets, Page Layout
    Replies: 1
    Last Post: 25 May 2014, 05:44 AM
  2. How to embed SFE file into the page?
    By Lazar in forum Addon Sideboxes
    Replies: 15
    Last Post: 22 Apr 2011, 07:09 PM
  3. Embed a wiki page that already exists into the center column
    By DavidRoss in forum General Questions
    Replies: 0
    Last Post: 19 Mar 2007, 12:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg