Home » Forum
NoNumber!

Joomla! extensions & websites
development / support / consultancy

I try to respond within 24 hours (excluding weekends). If I haven't responded by then, feel free to post a reminder or bug me via email.
Welcome, Guest
Please Login or Register.    Lost Password?

Problem with Internet Explorer 8
(1 viewing) (1) Guest
Go to bottomPage: 123
TOPIC: Problem with Internet Explorer 8
#6693
Problem with Internet Explorer 8 7 Months, 2 Weeks ago  
Hello!

Im using sourcer to put a javascript code at Joomla article. But when I look the website woth Internet explorer it appear and showing error. This is the code that I insert:

{source}
<script type="text/javascript">
function obtenerVideo() {
    var videos = new Array();
    videos[0] = 'http://www.youtube.com/v/pgUqWDEweuU&hl=en_US&fs=1&color1=0x234900&color2=0x4e9e00&border=1';

    videos[1] = 'http://www.youtube.com/v/lAEfizVIn9A&hl=en_US&fs=1&color1=0x234900&color2=0x4e9e00&border=1';

    videos[2] = 'http://www.youtube.com/v/SmWzO3suOOk&hl=en_US&fs=1&color1=0x234900&color2=0x4e9e00&border=1';

    videos[3] = 'http://www.youtube.com/v/jfrMY984cxM&hl=en_US&fs=1&color1=0x234900&color2=0x4e9e00&border=1';

    videos[4] = 'http://www.youtube.com/v/KKBRk1Vb_zY&hl=en_US&fs=1&color1=0x234900&color2=0x4e9e00&border=1';

    videos[5] = 'http://www.youtube.com/v/H_NCVNsVIA4&hl=en_US&fs=1&color1=0x234900&color2=0x4e9e00&border=1';

    videos[6] = 'http://www.youtube.com/v/m1wOq3GD9LY&hl=en_US&fs=1&color1=0x234900&color2=0x4e9e00&border=1';

    videos[7] = 'http://www.youtube.com/v/HINjxTLdSCI&hl=en_US&fs=1&color1=0x234900&color2=0x4e9e00&border=1';

    videos[8] = 'http://www.youtube.com/v/n_xrJTgkt5c&hl=en_US&fs=1&color1=0x234900&color2=0x4e9e00&border=1';

var video = videos[Math.floor(Math.random() * (videos.length))];
    document.write("<object width='340' height='285'><param name='movie' value='" + video + "'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='" + video + "' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='340' height='285'></embed></object>");
}
</script>
<script type="text/javascript">obtenerVideo();</script>
{/source}


Can anyobdoy help me?



Sorry for my bad english

www.nudos.org
turminator
Posts: 9
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#6695
Re: Problem with Internet Explorer 8 7 Months, 2 Weeks ago  
I can see you have javascript errors on your site (in firefox) which will probably be the reason your site breaks on IE.
Error: document.getElementById("imgCuerdas") is null
Source File: www.nudos.org/
Line: 390
Peter van Westen
Admin
Posts: 4549
User Online NowClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#6696
Re: Problem with Internet Explorer 8 7 Months, 2 Weeks ago  
So the problem is with the image scripts:
<script type="text/javascript">
obtenerImagenes();
</script>
Peter van Westen
Admin
Posts: 4549
User Online NowClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
#6697
Re: Problem with Internet Explorer 8 7 Months, 2 Weeks ago  
Thanks for your support. Also I use a javascript code to reload images and I put the code in the article:

{source}<script type="text/javascript">
var maxCantImagenes = 4;
function obtenerRandom()
{
var ranNum = Math.floor(Math.random() * (maxCantImagenes));
return ranNum;
}

function obtenerImagenes() {
document.getElementById('imgCuerda').src = "img/cuerda" + obtenerRandom() + ".jpg";
document.getElementById('imgLibro').src = "img/libro" + obtenerRandom() + ".jpg";
document.getElementById('imgMochila').src = "img/mochila" + obtenerRandom() + ".jpg";
document.getElementById('imgPesca').src = "img/pesca" + obtenerRandom() + ".jpg";
document.getElementById('imgPrimerosAuxilios').src = "img/primerosauxilios" + obtenerRandom() + ".jpg";
document.getElementById('imgSubmarinismo').src = "img/submarinismo" + obtenerRandom() + ".jpg";
}
</script>

<style type="text/css">
.titulosCategoriasVenta
{
text-align:center;    
font-family:Verdana;
font-size:medium;
font-weight:bold;
text-decoration:none;
color:Maroon;
}
</style>



<script type="text/javascript">
obtenerImagenes();
</script>

{/source}


Then, I create a table with images with this code:

<table align="center" border="1" cellpadding="0" cellspacing="0">
    <tbody>
        <tr>
            <td>
                <table style="text-align: center;" border="0">
                    <tbody>
                        <tr>
                            <td style="vertical-align: bottom;"><a href="Cuerdas"><img src="javascript:obtenerImagen();" alt="Cuerdas" title="Cuerdas" id="imgCuerdas" border="0" /><br /><span class="titulosCategoriasVenta">Cuerdas</span> </a></td>
                            <td style="vertical-align: bottom;"><a href="Libros"><img src="img/libro0.jpg" alt="Libros" title="Libros" id="imgLibro" border="0" /><br /><span class="titulosCategoriasVenta">Libros</span></a></td>
                            <td style="vertical-align: bottom;"><a href="Mochilas"><img src="img/mochila0.jpg" alt="Mochilas" title="Mochilas" id="imgMochila" border="0" /><br /><span class="titulosCategoriasVenta">Mochilas</span></a></td>
                        </tr>
                        <tr>
                            <td style="vertical-align: bottom;"><a href="Pesca"><img src="img/pesca0.jpg" alt="Pesca" title="Pesca" id="imgPesca" border="0" /><br /><span class="titulosCategoriasVenta">Pesca</span></a></td>
                            <td style="vertical-align: bottom;"><a href="Primeros-auxilios"><img src="img/primerosauxilios0.jpg" alt="Primeros Auxilios" title="Primeros Auxilios" id="imgPrimerosAuxilios" border="0" /><br /><span class="titulosCategoriasVenta">Primeros Auxilios</span></a></td>
                            <td style="vertical-align: bottom;"><a href="Submarinismo"><img src="img/submarinismo0.jpg" alt="Submarinismo" title="Submarinismo" id="imgSubmarinismo" border="0" /><br /><span class="titulosCategoriasVenta">Submarinismo</span></a></td>
                        </tr>
                    </tbody>
                </table>
            </td>
        </tr>
    </tbody>
</table>


I don't know how can repair it?

See you and best regards!
turminator
Posts: 9
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#6699
Re:Problem with Internet Explorer 8 7 Months, 2 Weeks ago  
Hello!

I delete a many code and now the problem persists. Only I have this code for diferent types of videos.

{source}<script type="text/javascript">
enlace = new Array()
enlace[0] = '<object width="340" height="285"><param name="movie" value="http://www.youtube.com/v/lAEfizVIn9A&hl=es_ES&fs=1&color1=0x234900&color2=0x4e9e00&border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/lAEfizVIn9A&hl=es_ES&fs=1&color1=0x234900&color2=0x4e9e00&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="340" height="285"></embed></object>'
enlace[1] = '<object width="340" height="285"><param name="movie" value="http://www.youtube.com/v/jfrMY984cxM&hl=es_ES&fs=1&color1=0x234900&color2=0x4e9e00&border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/jfrMY984cxM&hl=es_ES&fs=1&color1=0x234900&color2=0x4e9e00&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="340" height="285"></embed></object>'
enlace[2] = '<object width="340" height="285"><param name="movie" value="http://www.youtube.com/v/HINjxTLdSCI&hl=es_ES&fs=1&color1=0x234900&color2=0x4e9e00&border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/HINjxTLdSCI&hl=es_ES&fs=1&color1=0x234900&color2=0x4e9e00&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="340" height="285"></embed></object>'
enlace[3] = '<object width="340" height="285"><param name="movie" value="http://www.youtube.com/v/KKBRk1Vb_zY&hl=es_ES&fs=1&color1=0x234900&color2=0x4e9e00&border=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/KKBRk1Vb_zY&hl=es_ES&fs=1&color1=0x234900&color2=0x4e9e00&border=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="340" height="285"></embed></object>'

aleatorio = Math.random() * (enlace.length)
aleatorio = Math.floor(aleatorio)
document.write('<div align="center">' + enlace[aleatorio] + '</div>')
</script>{/source}
turminator
Posts: 9
User OfflineClick here to see the profile of this user
The administrator has disabled public write access.
 
#6701
Re:Problem with Internet Explorer 8 7 Months, 2 Weeks ago  
Try and put the activation scripts in the head with a piece of code that runs it when page is fully loaded.
Like:
window.addEvent('domready', function(){ obtenerImagenes(); });


See here on how to add scripts to the head of your page:
www.nonumber.nl/forum/14-sourcerer/5174-...ead-of-the-html-page
Peter van Westen
Admin
Posts: 4549
User Online NowClick here to see the profile of this user
The administrator has disabled public write access.
Need to contact me directly? Go to my contact page.
If you use any NoNumber! extensions, please post a rating and a review at the Joomla! Extensions Directory.
Are you happy with the support? Please consider buying a License Code to help me to continue development and support.
 
Go to topPage: 123
Joomla Open Source Training