473,385 Members | 1,324 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

JavaScript in IE7

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\a3ea873c4509f9ac6e22d9efdc04 4f55\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>

Mar 26 '07 #1
3 5185
On Mon, 26 Mar 2007 11:02:18 +0200, <Ru********@gmail.comwrote:
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\a3ea873c4509f9ac6e22d9efdc04 4f55\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.
--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Mar 31 '07 #2
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>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Mar 31 '07 #3
On Sat, 31 Mar 2007 19:15:43 +0200, Evertjan.
<ex**************@interxnl.netwrote:
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>

Oh, wonderful :rolleyes:

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
Mar 31 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.