General / Allgemeines > Programming

Javascript doesn't work in Internet Explorer,but well works in Firefox and Opera

(1/2) > >>

Lakmus:
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  :(

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  :oops:

V@no:
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.

Lakmus:
I use a template iceberg for 4images, here it's code of header.html

--- Code: ---<!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">
--- End code ---

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


--- Code: ---<!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 />
--- End code ---

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

Link to my site http://avatarko.com/

V@no:
I don't see that javascript in the source of your page.

Lakmus:
Excuse, I deleted it, at check. Now it on a place.

Navigation

[0] Message Index

[#] Next page

Go to full version