Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / JavaScript / March 2007



Tip: Looking for answers? Try searching our database.

JavaScript in IE7

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RussianNeo@gmail.com - 26 Mar 2007 10:02 GMT
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>
OmegaJunior - 31 Mar 2007 17:27 GMT
> Hi everybody!
>
[quoted text clipped - 54 lines]
> ......................
> </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.

Signature

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

Evertjan. - 31 Mar 2007 18:15 GMT
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>

Signature

Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

OmegaJunior - 31 Mar 2007 18:21 GMT
> OmegaJunior wrote on 31 mrt 2007 in comp.lang.javascript:
>
[quoted text clipped - 16 lines]
> <button onclick='alert(this.innerHTML)'>
> Error</button>

Oh, wonderful :rolleyes:

Signature

Using Opera's revolutionary e-mail client: http://www.opera.com/mail/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.