You are not logged in.

servaas

Intermediate

  • "servaas" started this thread

Posts: 218

Location: Belgium

  • Send private message

1

Monday, May 28th 2012, 2:09pm

urgent : IE and Javascript

Hello everyone,

Does someone know why my javascript function does not work with Internet Explorer ?
You can check it on http://immo-virtueel.be/360_cam_bis/.
Click on 'Foto Album'

This is the code.

Source code

1
2
3
<plugin name="foto_onder" url="%SWFPATH%/images/foto.png" keep="true" x="305" y="0" align="topleft" zorder="102"  style="button_style"
		onclick="js(openPopup(gallerij2/index.html))"
	/>


This is the code in the html file :

Source code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<script type="text/javascript" src="js/jquery-1.6.2.min.js"></script>
   	<link media="screen" rel="stylesheet" href="js/colorbox/colorbox.css" />

	<script src="js/colorbox/jquery.colorbox.js"></script>
    <script type="text/javascript">
        function krpano(){
            return document.getElementById("krpanoSWFObject");
        }
        function openPopup(_url, _title, _width, _height, _type)
        {
            if(typeof _type === 'undefined') _type = 'iframe';
            if(typeof _width === 'undefined') _width = "85%";
            if(typeof _height === 'undefined') _height = "100%";
            
            console.log(_url, _type, _width, _height);
           
            $.colorbox({
                //onOpen: function(){ krpano().call("trace(0, 'opening popup')"); },
                //onClosed:function(){ krpano().call("trace(0, 'closing popup')"); },
                width: _width, 
                height: _height, 
                iframe: _type == 'iframe',
                href: _url
            });
        }
    </script>


This is the content of the js folder:


and the 'gallerij2' folder:


With IE, the button doesn't react at all...
This is what you should see :


Can someone help me with this ??!
Thanks in advance !

=servaas=

2

Monday, May 28th 2012, 2:39pm

Hi,
Try to change your wmode's setting : transparent ==> opaque

3

Monday, May 28th 2012, 4:24pm

Hi,

don't you see any Javascript errors?

the IE doesn't have a 'console' Object, so this line in your code:

Source code

1
console.log(_url, _type, _width, _height);
should break and stop your code and cause the not working...

best regards,
Klaus

servaas

Intermediate

  • "servaas" started this thread

Posts: 218

Location: Belgium

  • Send private message

4

Monday, May 28th 2012, 4:33pm

Hello Klaus,

With Internet Explorer I don't see any errors.

I don't know if I completely understand what you mean, but I'll play around with your tip.

Cheers,
=servaas=

servaas

Intermediate

  • "servaas" started this thread

Posts: 218

Location: Belgium

  • Send private message

5

Monday, May 28th 2012, 4:44pm

Hello Hello,

So, I have deleted the line

Source code

1
console.log(_url, _type, _width, _height);

and now it works fine !

Thanks Klaus !!

=servaas=

6

Monday, May 28th 2012, 8:20pm

Hi,
With Internet Explorer I don't see any errors.
in IE you need to enable the showing of JS errors first in the settings

best regards,
Klaus

servaas

Intermediate

  • "servaas" started this thread

Posts: 218

Location: Belgium

  • Send private message

7

Tuesday, May 29th 2012, 3:27pm

Thanks for the tip... I'm not a huge IE fan :-)