JavaScript in IE7

R

RussianNeo

Hi everybody!

I've got some problems with JavaScript in IE7... I'll try to describe
the situation...

I'm writing a toolbar for IE7. After IE loaded the page, the toolbar
changes the code of the page. It adds some JavaScript code.

The problem is: IE ignores all events and JS is not running... (it
happens only on RSS pages... on other pages it works correctly...)

Can anyone help me? :(

The code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML Strict//EN"><HTML
dir="ltr"><HEAD><TITLE></TITLE><META http-equiv="Content-Type"
content="text-html; charset=utf-8" /><LINK href="res://ieframe.dll/
FeedUI.css" type="text/css" rel="stylesheet" /></LINK><//LINK><STYLE
type="text/css" media="print"> .__feedview__sidebar {DISPLAY:
none}.__feedview__mainbody {MARGIN-RIGHT: 0px}</STYLE></
HEAD><BODY><DIV class="__feedview__mainbody">

...........................................
// Here is text with different styles... converted from xml...
..........................................

<SPAN class="mtb_tb_injection"
oncontextmenu="javascript:mtb_tb_SwitchDrop(this,'0',Array('0'));return
mtb_tb_stopEvents();" id="mycomp_highlight_0"
onmouseover="javascript:mtb_tb_imgOnOff(this,'_on','0',true,false);"
title="Call +3726203269 using mtb in Estonia"
onclick="javascript:doRunCMD('call','0');return mtb_tb_stopEvents();"
onmouseout="javascript:mtb_tb_imgOnOff(this,'_off','0',true,false)"
durex="663" context="620 32 69"><SPAN class="mtb_tb_nop">&nbsp;</
SPAN><SPAN class="mtb_tb_imgL" id="mtb_tb_img_l0"
onmouseover="javascript:mtb_tb_imgOnOff(this,'_on','0',false,false);"
title="" onclick="javascript:mtb_tb_SwitchDrop(this,'0',new
Array('0'));return false;"
onmouseout="javascript:mtb_tb_imgOnOff(this,'_off','0',false,false);">&nbsp;&nbsp;&nbsp;</
SPAN><SPAN class="mtb_tb_imgI"
id="mtb_tb_img_i0">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN
class="mtb_tb_injectionIn" id="mtb_tb_text0"><SPAN
class="mtb_tb_innerText" id="mtb_tb_innerText0">620 32 69&nbsp;</SPAN>

............................................

<IFRAME id="_acciframe_" src="about:blank" width="0" height="0"></
IFRAME></BODY><META content="EVONNWFSKU" name="mtb_FRAMEID" /><LINK
id="mtb_tb_style" href="C:\DOCUME~1\DOMREG~1.SOF\LOCALS~1\Temp
\__mtbIEToolbar_Cache\a3ea873c4509f9ac6e22d9efdc044f55\session
\menu.graph.modern.css" rel="stylesheet" /><SCRIPT id="mtb_tb_script"
defer type="text/javascript">

.......................
// JS functions contain inly "alert()" function... for debugging...
.......................
</SCRIPT></HTML>
 
O

OmegaJunior

Hi everybody!

I've got some problems with JavaScript in IE7... I'll try to describe
the situation...

I'm writing a toolbar for IE7. After IE loaded the page, the toolbar
changes the code of the page. It adds some JavaScript code.

The problem is: IE ignores all events and JS is not running... (it
happens only on RSS pages... on other pages it works correctly...)

Can anyone help me? :(

The code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML Strict//EN"><HTML
dir="ltr"><HEAD><TITLE></TITLE><META http-equiv="Content-Type"
content="text-html; charset=utf-8" /><LINK href="res://ieframe.dll/
FeedUI.css" type="text/css" rel="stylesheet" /></LINK><//LINK><STYLE
type="text/css" media="print"> .__feedview__sidebar {DISPLAY:
none}.__feedview__mainbody {MARGIN-RIGHT: 0px}</STYLE></
HEAD><BODY><DIV class="__feedview__mainbody">

..........................................
// Here is text with different styles... converted from xml...
.........................................

<SPAN class="mtb_tb_injection"
oncontextmenu="javascript:mtb_tb_SwitchDrop(this,'0',Array('0'));return
mtb_tb_stopEvents();" id="mycomp_highlight_0"
onmouseover="javascript:mtb_tb_imgOnOff(this,'_on','0',true,false);"
title="Call +3726203269 using mtb in Estonia"
onclick="javascript:doRunCMD('call','0');return mtb_tb_stopEvents();"
onmouseout="javascript:mtb_tb_imgOnOff(this,'_off','0',true,false)"
durex="663" context="620 32 69"><SPAN class="mtb_tb_nop">&nbsp;</
SPAN><SPAN class="mtb_tb_imgL" id="mtb_tb_img_l0"
onmouseover="javascript:mtb_tb_imgOnOff(this,'_on','0',false,false);"
title="" onclick="javascript:mtb_tb_SwitchDrop(this,'0',new
Array('0'));return false;"
onmouseout="javascript:mtb_tb_imgOnOff(this,'_off','0',false,false);">&nbsp;&nbsp;&nbsp;</
SPAN><SPAN class="mtb_tb_imgI"
id="mtb_tb_img_i0">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN
class="mtb_tb_injectionIn" id="mtb_tb_text0"><SPAN
class="mtb_tb_innerText" id="mtb_tb_innerText0">620 32 69&nbsp;</SPAN>

...........................................

<IFRAME id="_acciframe_" src="about:blank" width="0" height="0"></
IFRAME></BODY><META content="EVONNWFSKU" name="mtb_FRAMEID" /><LINK
id="mtb_tb_style" href="C:\DOCUME~1\DOMREG~1.SOF\LOCALS~1\Temp
\__mtbIEToolbar_Cache\a3ea873c4509f9ac6e22d9efdc044f55\session
\menu.graph.modern.css" rel="stylesheet" /><SCRIPT id="mtb_tb_script"
defer type="text/javascript">

......................
// JS functions contain inly "alert()" function... for debugging...
......................
</SCRIPT></HTML>

First: please to validate your page using a decent validator. Try this one:
http://validator.w3.org/

Second: why do your javascript handles include the javascript protocol?
This: onclick="javascript:anything()"
can be changed into this: onclick="anything()"
and will work in most browsers.

Might even work in MSIE7.

Third: using src="about:blank" on an iframe will generate a security
warning in MSIE7 unless the containing page is trusted. By default,
untrusted pages will not execute javascripts.
 
E

Evertjan.

OmegaJunior wrote on 31 mrt 2007 in comp.lang.javascript:
Second: why do your javascript handles include the javascript protocol?
This: onclick="javascript:anything()"
can be changed into this: onclick="anything()"
and will work in most browsers.

Might even work in MSIE7.

In IE UNLESS vbscript was previously called:

<script type='text/vbscript'>
'' nothing
</script>

<button onclick='javascript:alert(this.innerHTML)'>
No error</button>
<br>
<button onclick='alert(this.innerHTML)'>
Error</button>
 
O

OmegaJunior

OmegaJunior wrote on 31 mrt 2007 in comp.lang.javascript:


In IE UNLESS vbscript was previously called:

<script type='text/vbscript'>
'' nothing
</script>

<button onclick='javascript:alert(this.innerHTML)'>
No error</button>
<br>
<button onclick='alert(this.innerHTML)'>
Error</button>

Oh, wonderful :rolleyes:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top