HighDots Forums  

IE is driving me crazy

alt.html alt.html


Discuss IE is driving me crazy in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #11  
Old   
sheldonlg
 
Posts: n/a

Default Re: IE is driving me crazy - 04-29-2008 , 07:21 AM






Gregor Kofler wrote:
Quote:
sheldonlg meinte:

Uh, no. Everything works fine in Firefox. It is a simple "onClick".

It is "onclick", BTW.

Anyway, you state that

clickableelement onclick="foo()"

script type="text/javascript"
function foo() { alert ("bar!"); }
/script

is not working in IE? Impossible. Have you tried
clickableelement onclick="alert('bar!')"
In the Developer Toolbar, on the element that does the clicking (span
id=tree_011170), I have in the attribute area:

class fakelink
id tree_011170
onclick showFamilyTree(this, 'parent_011170')

I edited the attribute to be:
onclick alert('click works')

I then clicked the item and it did not alert. The problem is not in the
class fakelink because another clickable item (right after it) uses the
same class and it works. Both those items are within spans that have
the class fakelink attached to them. (fakelink is a class that makes it
look like a link). Just for the hell of it, I turned off pop-up blocker
and it made no difference. Also, another control that I was looking at
calls a javascript that has alerts and it alerts properly. There is
something about THIS particular control that IE does not like. The line
of code for this item is very straightforward and is:

<td align="center"><span id="tree_011170" class="fakelink"
onclick="showFamilyTree(this,'parent_011170')">Sho w Tree</span></td>

Finally, I also changed the code (for this debugging) so that for this
particular item it wrote directly:

<td align="center"><span id="tree_011170" class="fakelink"
onclick="alert('click works')">Show Tree</span></td>

Still nothing.

Once again, this all works perfectly in Firefox.


BTW: I also found out something interesting about the Toolbar in doing
all of this. I did some operations after setting the onclick in the
Toolbar as above that caused a re-rendering of the page with new
innerHTML. The onclick did not change back to the function, but stayed
at a straight alert -- even though the innerHTML rewrote the line to
call the function.


Quote:
Again: Error reporting in your IE is turned on? You have do that
*explicitly* in the settings dialog.
It is turned on. I had already unchecked the "Disable Script Debugging
(Internet Explorer)" after your first reply.

Quote:
Gregor




Reply With Quote
  #12  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: IE is driving me crazy - 04-29-2008 , 10:08 AM






Scripsit Gregor Kofler:

Quote:
Uh, no. Everything works fine in Firefox. It is a simple "onClick".

It is "onclick", BTW.
It's oNcLiCk or ONCLICK or ONcliCK or any other combination of lowercase
and uppercase, by HTML rules. So onClick works just as fine.

In XHTML, it must be in lowercase, though. On the other hand, if you
spell it differently, a markup validator reports an error. And in any
problem involving HTML, markup validation should be among the first
steps.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/



Reply With Quote
  #13  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: IE is driving me crazy - 04-29-2008 , 11:25 AM



sheldonlg wrote:

<snip code snippet garbage>
Quote:
td align="center"><span id="tree_011170" class="fakelink"
onclick="alert('click works')">Show Tree</span></td

Still nothing.

Once again, this all works perfectly in Firefox.
<snip more code snippet garbage>

Obviously you have an error somewhere *other* than what your are showing
in your snippets. If you really want a answer, then stop monkeying
around playing this game of 20-questions and post the URL. Think about
it, if you *do not know* what the problem is then how can you know what
part of your code to put in a snippet!

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #14  
Old   
sheldonlg
 
Posts: n/a

Default Re: IE is driving me crazy - 04-29-2008 , 02:40 PM



Jonathan N. Little wrote:
Quote:
sheldonlg wrote:

snip code snippet garbage
td align="center"><span id="tree_011170" class="fakelink"
onclick="alert('click works')">Show Tree</span></td

Still nothing.

Once again, this all works perfectly in Firefox.

snip more code snippet garbage

Obviously you have an error somewhere *other* than what your are showing
in your snippets. If you really want a answer, then stop monkeying
around playing this game of 20-questions and post the URL. Think about
it, if you *do not know* what the problem is then how can you know what
part of your code to put in a snippet!

I can't do that. First of all, it is an intranet application and to
access it you would have to login over a VPN. Second of all, it is a
massive application built upon an AJAX framework. A "view page source"
only shows the template. I can see the code in Firebug or outlines of it
in the Developer Toolbar.

I posted those because that is what is failing. Obviously, the error is
coming from somewhere else, since narrowing these down show that these,
by themselves, have to work.

Right now, my best quess is that comes from how the code is written. My
reasoning is that on the line where this is located there are three
items that invoke javascipt. How they respond (or not) depends upon the
order that they appear. For example, with A, B, and C in that order, A
and B don't work but C does. If I reverse the order of B and C, nothing
works. If I make it B, A, C, then only C works -- but requires a
double-click. I played around with the code because I thought that
perhaps I was writing some non-printable character in generating the
html that was messing things up (since C worked).

My next step will be to avoid printing everything on the page except
that one line and see what happens. I know this is like shooting in the
dark, but is the best I can do right now to try to narrow down the
problem. BTW, IE7 behaves the same way as IE6.


Reply With Quote
  #15  
Old   
Jonathan N. Little
 
Posts: n/a

Default Re: IE is driving me crazy - 04-29-2008 , 04:16 PM



sheldonlg wrote:
Quote:
Jonathan N. Little wrote:

Obviously you have an error somewhere *other* than what your are
showing in your snippets. If you really want a answer, then stop
monkeying around playing this game of 20-questions and post the URL.
Think about it, if you *do not know* what the problem is then how can
you know what part of your code to put in a snippet!


I can't do that. First of all, it is an intranet application and to
access it you would have to login over a VPN. Second of all, it is a
massive application built upon an AJAX framework. A "view page source"
only shows the template. I can see the code in Firebug or outlines of it
in the Developer Toolbar.

I posted those because that is what is failing. Obviously, the error is
coming from somewhere else, since narrowing these down show that these,
by themselves, have to work.
Well if you cannot see the posting a URL at least a demo page that still
exhibits your problem to a public server, well...good luck with that!

--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com


Reply With Quote
  #16  
Old   
sheldonlg
 
Posts: n/a

Default Re: IE is driving me crazy - 04-29-2008 , 04:38 PM



Jonathan N. Little wrote:
Quote:
sheldonlg wrote:
Jonathan N. Little wrote:

Obviously you have an error somewhere *other* than what your are
showing in your snippets. If you really want a answer, then stop
monkeying around playing this game of 20-questions and post the URL.
Think about it, if you *do not know* what the problem is then how can
you know what part of your code to put in a snippet!


I can't do that. First of all, it is an intranet application and to
access it you would have to login over a VPN. Second of all, it is a
massive application built upon an AJAX framework. A "view page
source" only shows the template. I can see the code in Firebug or
outlines of it in the Developer Toolbar.

I posted those because that is what is failing. Obviously, the error
is coming from somewhere else, since narrowing these down show that
these, by themselves, have to work.

Well if you cannot see the posting a URL at least a demo page that still
exhibits your problem to a public server, well...good luck with that!

I found the source of my problem. Now I could use a bit of help fixing
it. This application has a few hidden blocks of code that pushing a
button makes visible. They are all specified with a class called
exclude_form_class (which I will show below). I brute forced the
debugging by eliminating everything and putting things back one by one
until it broke again. Those blocks of code broke it. If I omitted the
class specification, then the javascript worked. Here is the class
declaration in the css:

******************************
..exclude_form_class
{
position: fixed;
z-index: 99;
top: 200px;
background-color: rgb(221, 221, 221);
visibility: hidden;
}

* html .exclude_form_class {position:absolute;}

<!--[if lte IE 6]>
html {overflow-x:auto; overflow-y:hidden;}
<![endif]-->
******************************

The intent is to have the block of code come up at roughly the middle of
the screen no matter where we are on the page (which could grow to be
rather large). So, the objective is fix this so that it doesn't affect
anything else, yet works in both browsers appearing in the middle of the
screen. (A javascript function modifies the visibility attribute). I
could use some suggestions here as I am primarily a php/java/etc.
programmer and am a relative newcomer to javascript and css.


Reply With Quote
  #17  
Old   
John Hosking
 
Posts: n/a

Default Re: IE is driving me crazy - 04-29-2008 , 06:33 PM



On Tue, 29 Apr 2008 17:38:47 -0400, sheldonlg wrote:

Quote:
* html .exclude_form_class {position:absolute;}

!--[if lte IE 6]
html {overflow-x:auto; overflow-y:hidden;}
![endif]--
******************************

Don't know, really, and I can't even say I care enough to check through the
selected semi-snippets of random code you've provided, but maybe this will
interest or even help you, since I gathered your problem was a difference
between IE6 and IE7.

See the page at http://msdn.microsoft.com/en-us/library/bb250496.aspx and,
in particular, search for the section headed, "* HTML Filter".

So, IE7 will ignore the positioning rule above. Does that help you any?

--
John


Reply With Quote
  #18  
Old   
Bergamot
 
Posts: n/a

Default Re: IE is driving me crazy - 04-30-2008 , 08:35 AM




John Hosking wrote:
Quote:
On Tue, 29 Apr 2008 17:38:47 -0400, sheldonlg wrote:

* html .exclude_form_class {position:absolute;}

!--[if lte IE 6]
html {overflow-x:auto; overflow-y:hidden;}
![endif]--

IE7 will ignore the positioning rule above.
Actually, that is probably the desired behavior. position:fixed is the
default rule (which you snipped). IE7 does support position:fixed, so it
should *not* apply the *html rule.

--
Berg


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.