SimplePortal

Support => English Support => Topic started by: katoon on June 01, 2012, 09:01:48 AM

Title: java help
Post by: katoon on June 01, 2012, 09:01:48 AM
hey, i have a problem were if i have one block enabled the other dont work.

I have -
nivo slider and a youtube code that you click on the image and it opens a box with the vid like so
(http://i.imgur.com/eZyJC.png)

The problem i have is if i have he youtube block enabled then the slider dont work

my website www.katoon.co.uk (http://www.katoon.co.uk)

codes:

youtube(mmay be a lil messy code but it works):
   
Code: [Select]
<title>jQuery YouTube Popup Player Plugin</title>
    <script type="text/javascript" src="youtube/jquery.min.js"></script>
    <link type="text/css"
        href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/black-tie/jquery-ui.css" rel="stylesheet" />
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
    <script type="text/javascript" src="youtube/jquery.youtubepopup.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("a.youtube").YouTubePopup({ autoplay: 0 });
        });
    </script>
</head>
<body>

    <center><a class="youtube" href="#" rel="jw3ApsIwSWY" title="Minecraft Cinematic - A Village Utopia"><img class="youtube" id="jw3ApsIwSWY" src="http://img.youtube.com/vi/jw3ApsIwSWY/1.jpg" title="Minecraft Cinematic - A Village Utopia" /></a></center>
<center><a class="youtube" rel="jw3ApsIwSWY" href="#"><font size="1">Minecraft Cinematic - A Village Utopia</font></a></center>
<br>
    <center><a class="youtube" href="#" rel="Q4nVIdcPzbQ" title="MW3 Tenth Prestige Lobby XBOX 360"><img class="youtube" id="Q4nVIdcPzbQ" src="http://img.youtube.com/vi/Q4nVIdcPzbQ/1.jpg" title="MW3 Tenth Prestige Lobby XBOX 360" /></a></center>
<center><a class="youtube" rel="Q4nVIdcPzbQ" href="#"><font size="1">MW3 Tenth Prestige Lobby XBOX 360</font></a></center>
<br>
    <center><a class="youtube" href="#" rel="QkkoHAzjnUs" title="Grand Theft Auto V Trailer"><img class="youtube" id="QkkoHAzjnUs" src="http://img.youtube.com/vi/QkkoHAzjnUs/1.jpg" title="Grand Theft Auto V Trailer" /></a></center>
<center><a class="youtube" rel="QkkoHAzjnUs" href="#"><font size="1">Grand Theft Auto V Trailer</font></a></center>
<br>
    <center><a class="youtube" href="#" rel="x3tedlWs1XY" title="Reveal Trailer - Official Call of Duty: Black Ops 2"><img class="youtube" id="x3tedlWs1XY" src="http://img.youtube.com/vi/x3tedlWs1XY/1.jpg" title="Reveal Trailer - Official Call of Duty: Black Ops 2" /></a></center>
<center><a class="youtube" rel="x3tedlWs1XY" href="#"><font size="1">Reveal Trailer - Official Call of Duty: Black Ops 2</font></a></center>
</body>
</html>


Silder code:
Code: [Select]
<link rel="stylesheet" href="/nivo-slider/themes/default/default.css" type="text/css" media="screen" />
<link rel="stylesheet" href="nivo-slider/nivo-slider.css" type="text/css" media="screen" />
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<div align="center&gt;
&lt;div id=">
<div class="slider-wrapper theme-default">
<div class="ribbon"></div>
<div id="slider" class="nivoSlider">
<a href="http://katoon.co.uk/index.php?action=forum">
<img alt="" title="Buy ViP today for only £2.00!" src="/nivo-slider/demo/images/vipp.png" /></a> 
<img alt="" src="/nivo-slider/demo/images/lpllp.png" />                               
<img alt="" data-transition="slideInLeft" src="/nivo-slider/demo/images/chest.png" />
<a href="http://katoon.buycraft.net/category/view/5340">                 
<img alt="" title="Click The Picture For More Information About Mystery Chest" />
<img alt="" data-transition="slideInLeft" src="/nivo-slider/demo/images/chest.png" />
<script type="text/javascript" src="/nivo-slider/demo/scripts/jquery-1.7.1.min.js"></script>     <script type="text/javascript" src="/nivo-slider/jquery.nivo.slider.pack.js"></script>     <script type="text/javascript">
    $(window).load(function() {
        $('#slider').nivoSlider();
    });
    </script>

need anymore info ask!!

were i got the youtube code
http://lab.abhinayrathore.com/jquery_youtube/ (http://lab.abhinayrathore.com/jquery_youtube/)

Title: Re: java help
Post by: phantomm on June 01, 2012, 09:08:41 AM
did you tried to replace
Code: [Select]
$(window).load(function() {and
Code: [Select]
$(function () {
 with:
Code: [Select]
jQuery(document).ready(function($){?
Title: Re: java help
Post by: katoon on June 01, 2012, 09:09:47 AM
did you tried to replace
Code: [Select]
$(window).load(function() {and
Code: [Select]
$(function () {
 with:
Code: [Select]
jQuery(document).ready(function($){?

no i will try now
Title: Re: java help
Post by: katoon on June 01, 2012, 09:12:02 AM
working thanks for the help  ;D

Solved
Title: Re: java help
Post by: AngelinaBelle on June 01, 2012, 09:15:22 AM
Thank you, phantomm.
You made that seem easy!

katoon, I'm glad that worked for you.
Title: Re: java help
Post by: phantomm on June 01, 2012, 09:31:42 AM
you're welcome :)
Title: Re: java help
Post by: katoon on June 01, 2012, 10:44:49 AM
its now doing this

(http://i47.tinypic.com/6f1ks4.png)
Title: Re: java help
Post by: katoon on June 02, 2012, 11:10:42 AM
bump
Title: Re: java help
Post by: phantomm on June 02, 2012, 11:31:11 AM
for some reason, slider isn't loading every time, have no idea why..
Title: Re: java help
Post by: katoon on June 02, 2012, 12:32:13 PM
for some reason, slider isn't loading every time, have no idea why..

i just deleted the hole youtube code and files in the ftp but its still the same so it might be a problem with the slider

this may be useful ;
http://www.codingforums.com/showthread.php?t=243040 (http://www.codingforums.com/showthread.php?t=243040)
Title: Re: java help
Post by: Chen Zhen on June 03, 2012, 12:03:30 AM
katoon,

This is for 2 html blocks on the same page?

Here are some possible causes:

The last 3 things I listed will probably make it work the way you want but those blocks will not render properly on all browsers until you fix all the issues imo.

Most browsers have plug-ins for analyzing the code to highlight page errors for you which would probably help you learn a lot about the code structure.

ie. for firefox there is html tidy
Title: Re: java help
Post by: katoon on June 03, 2012, 05:59:50 AM
katoon,

This is for 2 html blocks on the same page?

Here are some possible causes:
  • head & body tags already exist & should be omitted (not required for html block .. already on page)
  • <link> tags to load css belong prior to the pages original (proper) body tag
    (There is a command to inject new link tags if you must)
  • remove closing html tag (again already exists on page)
  • center tags are deprecated - use div, p or span with specific style attributes
  • <br> tags must be closed... <br />
  • div tags are not closed in the example you have shown for your 2nd block
  • <a> tag not closed in second block

The last 3 things I listed will probably make it work the way you want but those blocks will not render properly on all browsers until you fix all the issues imo.

Most browsers have plug-ins for analyzing the code to highlight page errors for you which would probably help you learn a lot about the code structure.

ie. for firefox there is html tidy

Hey,

Thanks for all the help. I am on a collage course soon so i will learn alot.

can you tidy up this code.

Code: [Select]
    <script type="text/javascript" src="youtube/jquery.min.js"></script>
    <link type="text/css"
        href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/black-tie/jquery-ui.css" rel="stylesheet" />
      <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js">
 </script>
    <script type="text/javascript" src="youtube/jquery.youtubepopup.min.js"></script>
    <script type="text/javascript">
        jQuery(document).ready(function($){
            $("a.youtube").YouTubePopup({ autoplay: 0 });
     });
</script>



<div style="width:200px;margin:auto;"><a class="youtube" href="#" rel="jw3ApsIwSWY" title="Minecraft Cinematic - A Village Utopia"><img class="youtube" id="jw3ApsIwSWY" src="http://img.youtube.com/vi/jw3ApsIwSWY/1.jpg" title="Minecraft Cinematic - A Village Utopia" /></a>
<a class="youtube" rel="jw3ApsIwSWY" href="#"><font size="1">Minecraft Cinematic - A Village Utopia</font></a></center></div>
<br></br>
<a class="youtube" href="#" rel="Q4nVIdcPzbQ" title="MW3 Tenth Prestige Lobby XBOX 360"><img class="youtube" id="Q4nVIdcPzbQ" src="http://img.youtube.com/vi/Q4nVIdcPzbQ/1.jpg" title="MW3 Tenth Prestige Lobby XBOX 360" /></a>
<a class="youtube" rel="Q4nVIdcPzbQ" href="#"><font size="1">MW3 Tenth Prestige Lobby XBOX 360</font></a>
<br></br>
<a class="youtube" href="#" rel="QkkoHAzjnUs" title="Grand Theft Auto V Trailer"><img class="youtube" id="QkkoHAzjnUs" src="http://img.youtube.com/vi/QkkoHAzjnUs/1.jpg" title="Grand Theft Auto V Trailer" /></a>
<a class="youtube" rel="QkkoHAzjnUs" href="#"><font size="1">Grand Theft Auto V Trailer</font></a>
<br></br>
<a class="youtube" href="#" rel="x3tedlWs1XY" title="Reveal Trailer - Official Call of Duty: Black Ops 2"><img class="youtube" id="x3tedlWs1XY" src="http://img.youtube.com/vi/x3tedlWs1XY/1.jpg" title="Reveal Trailer - Official Call of Duty: Black Ops 2" /></a></center>
<center><a class="youtube" rel="x3tedlWs1XY" href="#"><font size="1">Reveal Trailer - Official Call of Duty: Black Ops 2</font></a></div>    <script type="text/javascript" src="youtube/jquery.min.js"></script>
    <link type="text/css"
        href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/black-tie/jquery-ui.css" rel="stylesheet" />
      <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js">
 </script>
    <script type="text/javascript" src="youtube/jquery.youtubepopup.min.js"></script>
    <script type="text/javascript">
        jQuery(document).ready(function($){
            $("a.youtube").YouTubePopup({ autoplay: 0 });
     });
</script>



<div style="width:200px;margin:auto;"><a class="youtube" href="#" rel="jw3ApsIwSWY" title="Minecraft Cinematic - A Village Utopia"><img class="youtube" id="jw3ApsIwSWY" src="http://img.youtube.com/vi/jw3ApsIwSWY/1.jpg" title="Minecraft Cinematic - A Village Utopia" /></a>
<a class="youtube" rel="jw3ApsIwSWY" href="#"><font size="1">Minecraft Cinematic - A Village Utopia</font></a></center></div>
<br></br>
<a class="youtube" href="#" rel="Q4nVIdcPzbQ" title="MW3 Tenth Prestige Lobby XBOX 360"><img class="youtube" id="Q4nVIdcPzbQ" src="http://img.youtube.com/vi/Q4nVIdcPzbQ/1.jpg" title="MW3 Tenth Prestige Lobby XBOX 360" /></a>
<a class="youtube" rel="Q4nVIdcPzbQ" href="#"><font size="1">MW3 Tenth Prestige Lobby XBOX 360</font></a>
<br></br>
<a class="youtube" href="#" rel="QkkoHAzjnUs" title="Grand Theft Auto V Trailer"><img class="youtube" id="QkkoHAzjnUs" src="http://img.youtube.com/vi/QkkoHAzjnUs/1.jpg" title="Grand Theft Auto V Trailer" /></a>
<a class="youtube" rel="QkkoHAzjnUs" href="#"><font size="1">Grand Theft Auto V Trailer</font></a>
<br></br>
<a class="youtube" href="#" rel="x3tedlWs1XY" title="Reveal Trailer - Official Call of Duty: Black Ops 2"><img class="youtube" id="x3tedlWs1XY" src="http://img.youtube.com/vi/x3tedlWs1XY/1.jpg" title="Reveal Trailer - Official Call of Duty: Black Ops 2" /></a></center>
<center><a class="youtube" rel="x3tedlWs1XY" href="#"><font size="1">Reveal Trailer - Official Call of Duty: Black Ops 2</font></a></div>


again thanks!!!!
Title: Re: java help
Post by: Chen Zhen on June 03, 2012, 07:39:34 PM
katoon,

Code: [Select]
<script type="text/javascript" src="youtube/jquery.min.js"></script>
<script type="text/javascript">
var headID = document.getElementsByTagName("head")[0];         
var cssNode = document.createElement("link");
cssNode.type = "text/css";
cssNode.rel = "stylesheet";
cssNode.href = "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/black-tie/jquery-ui.css";
cssNode.media = "screen";
headID.appendChild(cssNode);
</script>   
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
<script type="text/javascript" src="youtube/jquery.youtubepopup.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($){
$("a.youtube").YouTubePopup({ autoplay: 0 });
});
</script>
<div style="width:200px;margin:auto;font-size:xx-small;text-align:center;">
<a class="youtube" href="#" rel="jw3ApsIwSWY" title="Minecraft Cinematic - A Village Utopia">
<img class="youtube" id="jw3ApsIwSWY" src="http://img.youtube.com/vi/jw3ApsIwSWY/1.jpg" title="Minecraft Cinematic - A Village Utopia" />
</a>
<a class="youtube" rel="jw3ApsIwSWY" href="#">Minecraft Cinematic - A Village Utopia</a>
</div>
<br />
<div style="width:200px;margin:auto;font-size:xx-small;text-align:center;">
<a class="youtube" href="#" rel="Q4nVIdcPzbQ" title="MW3 Tenth Prestige Lobby XBOX 360">
<img class="youtube" id="Q4nVIdcPzbQ" src="http://img.youtube.com/vi/Q4nVIdcPzbQ/1.jpg" title="MW3 Tenth Prestige Lobby XBOX 360" />
</a>
<a class="youtube" rel="Q4nVIdcPzbQ" href="#">MW3 Tenth Prestige Lobby XBOX 360</a>
</div>
<br />
<div style="width:200px;margin:auto;font-size:xx-small;text-align:center;">
<a class="youtube" href="#" rel="QkkoHAzjnUs" title="Grand Theft Auto V Trailer">
<img class="youtube" id="QkkoHAzjnUs" src="http://img.youtube.com/vi/QkkoHAzjnUs/1.jpg" title="Grand Theft Auto V Trailer" />
</a>
<a class="youtube" rel="QkkoHAzjnUs" href="#">Grand Theft Auto V Trailer</a>
</div>
<br />
<div style="width:200px;margin:auto;font-size:xx-small;text-align:center;">
<a class="youtube" href="#" rel="x3tedlWs1XY" title="Reveal Trailer - Official Call of Duty: Black Ops 2">
<img class="youtube" id="x3tedlWs1XY" src="http://img.youtube.com/vi/x3tedlWs1XY/1.jpg" title="Reveal Trailer - Official Call of Duty: Black Ops 2" />
</a>
<a class="youtube" rel="x3tedlWs1XY" href="#">Reveal Trailer - Official Call of Duty: Black Ops 2</a>
</div>

With the divs you might opt to omit the line breaks since each one drops down a line anyhow.
I never tested this.
Title: Re: java help
Post by: katoon on June 04, 2012, 11:42:04 AM
katoon,

Code: [Select]
<script type="text/javascript" src="youtube/jquery.min.js"></script>
<script type="text/javascript">
var headID = document.getElementsByTagName("head")[0];         
var cssNode = document.createElement("link");
cssNode.type = "text/css";
cssNode.rel = "stylesheet";
cssNode.href = "http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/black-tie/jquery-ui.css";
cssNode.media = "screen";
headID.appendChild(cssNode);
</script>   
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
<script type="text/javascript" src="youtube/jquery.youtubepopup.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($){
$("a.youtube").YouTubePopup({ autoplay: 0 });
});
</script>
<div style="width:200px;margin:auto;font-size:xx-small;text-align:center;">
<a class="youtube" href="#" rel="jw3ApsIwSWY" title="Minecraft Cinematic - A Village Utopia">
<img class="youtube" id="jw3ApsIwSWY" src="http://img.youtube.com/vi/jw3ApsIwSWY/1.jpg" title="Minecraft Cinematic - A Village Utopia" />
</a>
<a class="youtube" rel="jw3ApsIwSWY" href="#">Minecraft Cinematic - A Village Utopia</a>
</div>
<br />
<div style="width:200px;margin:auto;font-size:xx-small;text-align:center;">
<a class="youtube" href="#" rel="Q4nVIdcPzbQ" title="MW3 Tenth Prestige Lobby XBOX 360">
<img class="youtube" id="Q4nVIdcPzbQ" src="http://img.youtube.com/vi/Q4nVIdcPzbQ/1.jpg" title="MW3 Tenth Prestige Lobby XBOX 360" />
</a>
<a class="youtube" rel="Q4nVIdcPzbQ" href="#">MW3 Tenth Prestige Lobby XBOX 360</a>
</div>
<br />
<div style="width:200px;margin:auto;font-size:xx-small;text-align:center;">
<a class="youtube" href="#" rel="QkkoHAzjnUs" title="Grand Theft Auto V Trailer">
<img class="youtube" id="QkkoHAzjnUs" src="http://img.youtube.com/vi/QkkoHAzjnUs/1.jpg" title="Grand Theft Auto V Trailer" />
</a>
<a class="youtube" rel="QkkoHAzjnUs" href="#">Grand Theft Auto V Trailer</a>
</div>
<br />
<div style="width:200px;margin:auto;font-size:xx-small;text-align:center;">
<a class="youtube" href="#" rel="x3tedlWs1XY" title="Reveal Trailer - Official Call of Duty: Black Ops 2">
<img class="youtube" id="x3tedlWs1XY" src="http://img.youtube.com/vi/x3tedlWs1XY/1.jpg" title="Reveal Trailer - Official Call of Duty: Black Ops 2" />
</a>
<a class="youtube" rel="x3tedlWs1XY" href="#">Reveal Trailer - Official Call of Duty: Black Ops 2</a>
</div>

With the divs you might opt to omit the line breaks since each one drops down a line anyhow.
I never tested this.

Thanks for the code :)

Still didnt fix the problem and the slider code looks fine so idk what the problem could be.

maby the javascript?
Title: Re: java help
Post by: Chen Zhen on June 04, 2012, 08:44:23 PM
If you're using the code I last posted, the javascript is supposed to put a specific link tag right under the head tag of your home (portal) page & currently when I look at the page it is not present. That means its not loading that css file at all.

Try this:
Code: [Select]
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/black-tie/jquery-ui.css?fin20" />
<script type="text/javascript" src="youtube/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
<script type="text/javascript" src="youtube/jquery.youtubepopup.min.js"></script>
<script type="text/javascript">
jQuery(document).ready(function($){
$("a.youtube").YouTubePopup({ autoplay: 0 });
});
</script>
<div style="width:200px;margin:auto;font-size:xx-small;text-align:center;">
<a class="youtube" href="#" rel="jw3ApsIwSWY" title="Minecraft Cinematic - A Village Utopia">
<img class="youtube" id="jw3ApsIwSWY" src="http://img.youtube.com/vi/jw3ApsIwSWY/1.jpg" title="Minecraft Cinematic - A Village Utopia" />
</a>
<a class="youtube" rel="jw3ApsIwSWY" href="#">Minecraft Cinematic - A Village Utopia</a>
</div>
<br />
<div style="width:200px;margin:auto;font-size:xx-small;text-align:center;">
<a class="youtube" href="#" rel="Q4nVIdcPzbQ" title="MW3 Tenth Prestige Lobby XBOX 360">
<img class="youtube" id="Q4nVIdcPzbQ" src="http://img.youtube.com/vi/Q4nVIdcPzbQ/1.jpg" title="MW3 Tenth Prestige Lobby XBOX 360" />
</a>
<a class="youtube" rel="Q4nVIdcPzbQ" href="#">MW3 Tenth Prestige Lobby XBOX 360</a>
</div>
<br />
<div style="width:200px;margin:auto;font-size:xx-small;text-align:center;">
<a class="youtube" href="#" rel="QkkoHAzjnUs" title="Grand Theft Auto V Trailer">
<img class="youtube" id="QkkoHAzjnUs" src="http://img.youtube.com/vi/QkkoHAzjnUs/1.jpg" title="Grand Theft Auto V Trailer" />
</a>
<a class="youtube" rel="QkkoHAzjnUs" href="#">Grand Theft Auto V Trailer</a>
</div>
<br />
<div style="width:200px;margin:auto;font-size:xx-small;text-align:center;">
<a class="youtube" href="#" rel="x3tedlWs1XY" title="Reveal Trailer - Official Call of Duty: Black Ops 2">
<img class="youtube" id="x3tedlWs1XY" src="http://img.youtube.com/vi/x3tedlWs1XY/1.jpg" title="Reveal Trailer - Official Call of Duty: Black Ops 2" />
</a>
<a class="youtube" rel="x3tedlWs1XY" href="#">Reveal Trailer - Official Call of Duty: Black Ops 2</a>
</div>

That link tag you see at the start:
Code: [Select]
<link rel="stylesheet" type="text/css" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/black-tie/jquery-ui.css?fin20" />

... is supposed to be before the body of the page though.
Aside from manually adding it to your template, I would have to mess around with the previous javascript append command.

This is assuming you are running the previous block I posted.
I did not look at your slider code yet..

.. ok now I did. No, slider code is not proper & has many html errors.




Title: Re: java help
Post by: katoon on June 05, 2012, 11:35:07 AM
so do you know were the problem is?
Title: Re: java help
Post by: AngelinaBelle on June 05, 2012, 11:39:00 AM
Your first step would be to find and fix the HTML errors.
Then, you will have a much easier time dealing with any javascript problems you have.
Title: Re: java help
Post by: katoon on June 05, 2012, 01:32:10 PM
Your first step would be to find and fix the HTML errors.
Then, you will have a much easier time dealing with any javascript problems you have.

are these errors?

(http://i49.tinypic.com/2qjhsw3.png)
Title: Re: java help
Post by: katoon on June 05, 2012, 04:48:04 PM
hey.

i replaced the code withthe origonal code that i got and i got

(http://i48.tinypic.com/4ruc2h.png)

it don't show the images and i made sure the code was linked to an image. Here is the original code i got from someone off here.

Original code:
Code: [Select]
<link rel="stylesheet" href="/nivo-slider/themes/default/default.css" type="text/css" media="screen" />
<link rel="stylesheet" href="/nivo-slider/themes/pascal/pascal.css" type="text/css" media="screen" />
<link rel="stylesheet" href="/nivo-slider/themes/orman/orman.css" type="text/css" media="screen" />
<link rel="stylesheet" href="nivo-slider/nivo-slider.css" type="text/css" media="screen" />
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<div id="wrapper">
<div class="slider-wrapper theme-default">
<div class="ribbon"></div>
<div id="slider" class="nivoSlider"><img alt="" src="/nivo-slider/demo/images/toystory.jpg" />                 <a href="http://dev7studios.com"><img alt="" title="This is an example of a caption" src="/nivo-slider/demo/images/up.jpg" /></a>                 <img alt="" data-transition="slideInLeft" src="/nivo-slider/demo/images/walle.jpg" />                 <img alt="" title="#htmlcaption" src="/nivo-slider/demo/images/nemo.jpg" /></div>
<div id="htmlcaption" class="nivo-html-caption"><strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a>.</div>
</div>
</div>
<script type="text/javascript" src="/nivo-slider/demo/scripts/jquery-1.7.1.min.js"></script>     <script type="text/javascript" src="/nivo-slider/jquery.nivo.slider.pack.js"></script>     <script type="text/javascript">
    $(window).load(function() {
        $('#slider').nivoSlider();
    });
    </script>



Edited Code:
Code: [Select]
<link rel="stylesheet" href="/nivo-slider/themes/default/default.css" type="text/css" media="screen" />
<link rel="stylesheet" href="nivo-slider/nivo-slider.css" type="text/css" media="screen" />
<link rel="stylesheet" href="style.css" type="text/css" media="screen" />
<div align="center&gt;
&lt;div id=">
<div class="slider-wrapper theme-default">
<div class="ribbon"></div>
<div id="slider" class="nivoSlider">
<a href="http://katoon.co.uk/index.php?action=forum">
<img alt="" title="Buy ViP today for only £2.00!" src="/nivo-slider/demo/images/banner.png" /></a> 
<img alt="" src="/nivo-slider/demo/images/banner.png" />                               
<img alt="" data-transition="slideInLeft" src="/nivo-slider/demo/images/banner.png" />
<a href="http://katoon.buycraft.net/category/view/5340">                 
<img alt="" title="Click The Picture For More Information About Mystery Chest" src="/nivo-slider/demo/images/nanner.png"
 />
<script type="text/javascript" src="/nivo-slider/demo/scripts/jquery-1.7.1.min.js"></script>     <script type="text/javascript" src="/nivo-slider/jquery.nivo.slider.pack.js"></script>     <script type="text/javascript">
    jQuery(document).ready(function($){
        $('#slider').nivoSlider();
    });
    </script>


if you can see something wrong between the codes plz say !


also some errors:

TypeError: 'undefined' is not a function (evaluating 'jQuery("#forumposts").imagefit()')
TypeError: 'undefined' is not a function (evaluating '$('#slider').nivoSlider()')
Title: Re: java help
Post by: Chen Zhen on June 05, 2012, 08:56:07 PM
katoon,

I found a little routine that dynamically inserts css & js for the head of the page. I tested this with IE  (32 & 64bit), Firefox, Opera & Chrome with no issues so we know it will load up style sheets properly.
(I only tested the css & js insertion within the head element of the page)



Slider HTML Code:
Code: [Select]
<script type="text/javascript">
function loadheadfilex(filename, filetype){
 if (filetype=="js"){
  var fileref=document.createElement('script');
  fileref.setAttribute("type","text/javascript");
  fileref.setAttribute("src", filename);
 }
 else if (filetype=="css"){
  var fileref=document.createElement("link");
  fileref.setAttribute("rel", "stylesheet");
  fileref.setAttribute("type", "text/css");
  fileref.setAttribute("href", filename);
 }
 if (typeof fileref!="undefined")
  document.getElementsByTagName("head")[0].appendChild(fileref);
}
</script>
<script type="text/javascript">
loadheadfilex("/nivo-slider/themes/default/default.css?fin20", "css");
loadheadfilex("/nivo-slider/themes/pascal/pascal.css?fin20", "css");
loadheadfilex("/nivo-slider/themes/orman/orman.css?fin20", "css");
loadheadfilex("nivo-slider/nivo-slider.css?fin20", "css");
loadheadfilex("style.css?fin20", "css");
loadheadfilex("/nivo-slider/demo/scripts/jquery-1.7.1.min.js?fin20", "js");
loadheadfilex("/nivo-slider/jquery.nivo.slider.pack.js?fin20", "js");
</script>
<div id="wrapper2" style="text-align:center;">
<div class="slider-wrapper theme-default">
<div class="ribbon"></div>
<div id="slider" class="nivoSlider">
<a href="http://katoon.co.uk/index.php?action=forum">
<img alt="" title="Buy ViP today for only £2.00!" src="/nivo-slider/demo/images/banner.png" />
</a>
<img alt="" src="/nivo-slider/demo/images/banner.png" /> 
<img alt="" data-transition="slideInLeft" src="/nivo-slider/demo/images/banner.png" />
<a href="http://katoon.buycraft.net/category/view/5340">
<img alt="" title="Click The Picture For More Information About Mystery Chest" src="/nivo-slider/demo/images/nanner.png" />
</a>
</div>
</div>
</div>
<script type="text/javascript">
    $(window).load(function() {
        $('#slider').nivoSlider();
    });
</script>

I didn't understand what you were trying to accomplish with this line aside from centering everything:
Code: [Select]
<div align="center&gt;&lt;div id=">
.. so I adjusted it only for centering atm.
You should change all url's in the code to their full values since I'm not positive if you're using files on your server and/or another (just add the appropriate prefixes to the url's that are missing).

Imo - your issue could be caused by it not being able to locate the files to load some of the js & css.
You can always use full url's to make sure.



youtube code:
Code: [Select]
<script type="text/javascript">
function loadheadfiley(filename, filetype){
 if (filetype=="js"){
  var fileref=document.createElement('script');
  fileref.setAttribute("type","text/javascript");
  fileref.setAttribute("src", filename);
 }
 else if (filetype=="css"){
  var fileref=document.createElement("link");
  fileref.setAttribute("rel", "stylesheet");
  fileref.setAttribute("type", "text/css");
  fileref.setAttribute("href", filename);
 }
 if (typeof fileref!="undefined")
  document.getElementsByTagName("head")[0].appendChild(fileref);
}
</script>
<script type="text/javascript">
loadheadfiley("http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.10/themes/black-tie/jquery-ui.css?fin20", "css");
loadheadfiley("youtube/jquery.min.js?fin20", "js");
loadheadfiley("youtube/jquery.youtubepopup.min.js?fin20", "js");
loadheadfiley("http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js?fin20", "js");
</script>
<script type="text/javascript">
jQuery(document).ready(function($){
$("a.youtube").YouTubePopup({ autoplay: 0 });
});
</script>
<div style="width:200px;margin:auto;font-size:xx-small;text-align:center;">
<a class="youtube" href="#" rel="jw3ApsIwSWY" title="Minecraft Cinematic - A Village Utopia">
<img class="youtube" id="jw3ApsIwSWY" src="http://img.youtube.com/vi/jw3ApsIwSWY/1.jpg" title="Minecraft Cinematic - A Village Utopia" />
</a>
<a class="youtube" rel="jw3ApsIwSWY" href="#">Minecraft Cinematic - A Village Utopia</a>
</div>
<br />
<div style="width:200px;margin:auto;font-size:xx-small;text-align:center;">
<a class="youtube" href="#" rel="Q4nVIdcPzbQ" title="MW3 Tenth Prestige Lobby XBOX 360">
<img class="youtube" id="Q4nVIdcPzbQ" src="http://img.youtube.com/vi/Q4nVIdcPzbQ/1.jpg" title="MW3 Tenth Prestige Lobby XBOX 360" />
</a>
<a class="youtube" rel="Q4nVIdcPzbQ" href="#">MW3 Tenth Prestige Lobby XBOX 360</a>
</div>
<br />
<div style="width:200px;margin:auto;font-size:xx-small;text-align:center;">
<a class="youtube" href="#" rel="QkkoHAzjnUs" title="Grand Theft Auto V Trailer">
<img class="youtube" id="QkkoHAzjnUs" src="http://img.youtube.com/vi/QkkoHAzjnUs/1.jpg" title="Grand Theft Auto V Trailer" />
</a>
<a class="youtube" rel="QkkoHAzjnUs" href="#">Grand Theft Auto V Trailer</a>
</div>
<br />
<div style="width:200px;margin:auto;font-size:xx-small;text-align:center;">
<a class="youtube" href="#" rel="x3tedlWs1XY" title="Reveal Trailer - Official Call of Duty: Black Ops 2">
<img class="youtube" id="x3tedlWs1XY" src="http://img.youtube.com/vi/x3tedlWs1XY/1.jpg" title="Reveal Trailer - Official Call of Duty: Black Ops 2" />
</a>
<a class="youtube" rel="x3tedlWs1XY" href="#">Reveal Trailer - Official Call of Duty: Black Ops 2</a>
</div>
   
 
.. again change all url's to their full values.



I am not positive if you're using the slider code correctly for how you want it to display as I do not have the necessary js & css files (or a proper source url for them) plus I have never used it.
All I have done here is adjust the html so that browsers should render the page properly without error which will hopefully resolve your issue.

Title: Re: java help
Post by: katoon on June 06, 2012, 11:47:37 AM
Hey,

i looked through the new codes and some were leading to the wrong file. I edited them and still dont work. I put your new code in and its just dosnt show up at all now

i dont think the error is in the youtube code that works fine but its just the slider but the slider was working fine before i put in the youtube code.

Can you sign upto the website and ill give you an admin account so you can edit it and ill PM you the ftp details. Just want to get tis resolved.

ill pay if needed
Title: Re: java help
Post by: katoon on June 09, 2012, 10:14:08 AM
Anyone else help me with this?
Title: Re: java help
Post by: AngelinaBelle on August 10, 2012, 09:45:30 AM
This seems like a lot of custom work. 
It seems like the HTML or JS of these two blocks interferes with each other.

I think your first step should be to remove all HTML errors from the page.  You can use the w3 XHTML checker link at the bottom of the page for that.
SimplePortal 2.3.8 © 2008-2024, SimplePortal