4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
July 01, 2016, 12:58:30 AM

Login with username, password and session length
Search:     Advanced search
Check the new Tutorial subforum with helpfull guides and tutorials for modifications and tweaks.
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  General / Allgemeines
| |-+  Programming
| | |-+  Javascript doesn't work in Internet Explorer,but well works in Firefox and Opera
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
This topic has not yet been rated!
Author Topic: Javascript doesn't work in Internet Explorer,but well works in Firefox and Opera  (Read 22463 times)
Lakmus
Pre-Newbie

Offline Offline

Posts: 6

Thank You
-Given: 0
-Receive: 0


View Profile
« on: August 29, 2008, 03:40:59 PM »

Hello! I have a big  problem with javascript at 4images gallery.

Javascript does not work in Internet Explorer, but well works in Firefox and Opera  Sad

Here a script which I use:

<script language="JavaScript" type="text/javascript" src="http://bash.org.ru/forweb">
</script>

I insert this script in header.html

But in internet explorer it does not work, help me to solve this problem please  Embarassed
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 561

mmm PHP...


View Profile WWW
« Reply #1 on: August 30, 2008, 01:20:10 AM »

Hello and welcome to 4images forum.

1) this is not related to 4images itself, topic moved to chit chat.
2) other then guess that this script has to be placed inside <body></body> I have no idea why it doesn't work in IE.
Perhaps providing us with more information about what this script supposed to do and link to your site could help find a solution.
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
Lakmus
Pre-Newbie

Offline Offline

Posts: 6

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #2 on: August 30, 2008, 09:13:10 AM »

I use a template iceberg for 4images, here it's code of header.html
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{site_name}</title>
<meta http-equiv="content-type" content="text/html; charset={charset}" />
<link rel="stylesheet" href="{template_url}/images/style.css" />


<script language="javascript" type="text/javascript">

<!--

  var captcha_reload_count = 0;
var captcha_image_url = "{url_captcha_image}";
  function new_captcha_image() {
    if (captcha_image_url.indexOf('?') == -1) {
  document.getElementById('captcha_image').src= captcha_image_url+'?c='+captcha_reload_count;
} else {
  document.getElementById('captcha_image').src= captcha_image_url+'&c='+captcha_reload_count;
}

    document.getElementById('captcha_input').value="";
    document.getElementById('captcha_input').focus();
    captcha_reload_count++;
  }

function opendetailwindow() {
    window.open('','detailwindow','toolbar=no,scrollbars=yes,resizable=no,width=680,height=480');
  }
 
  function right(e) {
    if ((document.layers || (document.getElementById && !document.all)) && (e.which == 2 || e.which == 3)) {
      alert("© Copyright by {site_name}");
      return false;
    }
    else if (event.button == 2 || event.button == 3) {
      alert("© Copyright by {site_name}");
      return false;
    }
    return true;
  }

  if (document.layers){
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown = right;
  }
  else if (document.all && !document.getElementById){
    document.onmousedown = right;
  }

document.oncontextmenu = new Function("alert('© Copyright by {site_name}');return false");

// -->
</script>

{if has_rss}
<link rel="alternate" type="application/rss+xml" title="{rss_title}" href="{rss_url}" />
{endif has_rss}
</head>
<body>
<div id="container">

I inserted a code inside <head> </head> and as after <body>, but it does not work in IE. As I inserted a code in default  template 4images, but it doesn't work.


This javascript deduces ridiculous citations from a comic site. But a problem not in it's code, because any javascript code which I insert does not work in IE.

Here it's a code of default header.html

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
27
28
29
30
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{direction}">
<head>
<title>{site_name}</title>
<meta http-equiv="content-type" content="text/html; charset={charset}" />
<link rel="stylesheet" href="{template_url}/style.css" />
<script language="javascript" type="text/javascript">
<!--

  var captcha_reload_count = 0;
var captcha_image_url = "{url_captcha_image}";
  function new_captcha_image() {
    if (captcha_image_url.indexOf('?') == -1) {
  document.getElementById('captcha_image').src= captcha_image_url+'?c='+captcha_reload_count;
} else {
  document.getElementById('captcha_image').src= captcha_image_url+'&c='+captcha_reload_count;
}

    document.getElementById('captcha_input').value="";
    document.getElementById('captcha_input').focus();
    captcha_reload_count++;
  }


{if has_rss}
<link rel="alternate" type="application/rss+xml" title="{rss_title}" href="{rss_url}" />
{endif has_rss}
</head>
<body bgcolor="#FFFFFF" text="#0F5475" link="#0F5475" vlink="#0F5475" alink="#0F5475">
<br />

I reinstalled 4images, but even in only that established 4images doesn't work javascript in IE.

Link to my site http://avatarko.com/
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 561

mmm PHP...


View Profile WWW
« Reply #3 on: August 30, 2008, 09:49:10 AM »

I don't see that javascript in the source of your page.
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
Lakmus
Pre-Newbie

Offline Offline

Posts: 6

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #4 on: August 30, 2008, 11:15:19 AM »

Excuse, I deleted it, at check. Now it on a place.
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 561

mmm PHP...


View Profile WWW
« Reply #5 on: August 30, 2008, 06:13:27 PM »

It shows fine in IE6, IE7 and IE8...
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
Lakmus
Pre-Newbie

Offline Offline

Posts: 6

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #6 on: August 30, 2008, 06:24:34 PM »

Thanks you, now all work  Very Happy
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.261 seconds with 19 queries.
Post your comments here