CodingIE, spawn of Satan

 

Press Ctrl+Enter to quickly submit your post
Quick Reply  
 
 
  
 From:  CHYRON (DSMITHHFX)  
 To:  ALL
40661.1 
trying to get a dead simple jquery click-show submenu thing happening. Worked great, except in IE where it works first time, then stops responding to clicks until a forced page reload, even when going to another page on the site (which to me is like an automagic page reload right there).

I had to resort to applying an inline onclick="" pointing to the function. Only for IE. This took me ~3-hours to figure out.

 (fail)  (fail)  (fail)

----
"But as the baby's mouth develops into adulthood, it will ultimately be used for badmouthing co-workers, interrupting people when they speak, and never bothering to say thank you."
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  CHYRON (DSMITHHFX)     
40661.2 In reply to 40661.1 
1. Tools>Internet Options>Settings>"Every time I visit the webpage"

2. F12>Console

0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  Peter (BOUGHTONP)     
40661.3 In reply to 40661.2 
1. irrelevant.

2. not user friendly.

----
"But as the baby's mouth develops into adulthood, it will ultimately be used for badmouthing co-workers, interrupting people when they speak, and never bothering to say thank you."
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  CHYRON (DSMITHHFX)     
40661.4 In reply to 40661.3 
1. you're sure about that?

2. irrelevant.

0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  Peter (BOUGHTONP)     
40661.5 In reply to 40661.4 
1. the issue is that, in this case, IE 10 could not register more than one click on an entity via an external javascript*, even
Code:
$('#entity').click(function() { alert('clicked') };
It would respond to the one click only then stop responding, unlike all other browsers which displayed the alert every time it was clicked. I was only able to fix this for IE by applying an inline <div id="entity" onclick="myFunction();">.

2. I'm not making this web page for me, or other developers who want to have a looksee at code. No, it is for Joe Average web visitor who can't be expected to do such a thing, not even for this very, very special web site. So yeah, your developer tools suggestion is a non-starter.



* in fairness this is not quite as straightforward as it sounds: I was shoehorning a submenu into an existing css list/js  drop-down menu (someone else's baby, which doesn't natively support submenus) loaded via php include. Also in fairness, no other browser blinked at this trivial task.

----
"But as the baby's mouth develops into adulthood, it will ultimately be used for badmouthing co-workers, interrupting people when they speak, and never bothering to say thank you."
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  CHYRON (DSMITHHFX)     
40661.6 In reply to 40661.5 
Looking at the console is a debugging step to stop it taking three hours, you twonk.

IE and jQuery are each the most frequently used of their kind; they work together. The issue was thus something else - perhaps a JS error (guess where they show up), or a conflict with some other JS (guess where you can see all other scripts on a page), maybe a quirks mode issue (guess where you can enforce standards compliance), though my current leaning is more towards PEBKAC.

0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  Peter (BOUGHTONP)     
40661.7 In reply to 40661.6 

they work together

Except when they don't.
 

Quote:
The issue was thus something else - perhaps a JS error (guess where they show up), or a conflict with some other JS (guess where you can see all other scripts on a page), maybe a quirks mode issue (guess where you can enforce standards compliance)

Or maybe it's just an IE problem, since it only affects IE.


----
"But as the baby's mouth develops into adulthood, it will ultimately be used for badmouthing co-workers, interrupting people when they speak, and never bothering to say thank you."
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  CHYRON (DSMITHHFX)     
40661.8 In reply to 40661.7 
It doesn't affect my IE.
0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  Peter (BOUGHTONP)     
40661.9 In reply to 40661.8 
This code issue affected two different instances of IE. I'm betting it would affect your IE. Point being, it doesn't affect anything else. Writing working code for everything else: 10-minutes. For IE: 3-hours. Most of the folks I know have long since dumped that buggy POS for Chrome.

Apparently not just them...

----
"But as the baby's mouth develops into adulthood, it will ultimately be used for badmouthing co-workers, interrupting people when they speak, and never bothering to say thank you."

Attachments:

0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  CHYRON (DSMITHHFX)     
40661.10 In reply to 40661.9 
Well sure, your dodgy code probably wouldn't work in my Firefox either.

If I had written it, it would've taken 3 minutes, worked with every browser, and smelt like a summer day in Tuscany.

0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  Peter (BOUGHTONP)     
40661.11 In reply to 40661.10 
Ah but it did work in Firefox (which incidentally the web developer plugin gave my script a clean bill of health), and in Chrome, and in Safari.

Repeat after me: it.did.not.work.in.IE.and.it.only.did.not.work.in.IE.

See? That wasn't so hard!


----
"But as the baby's mouth develops into adulthood, it will ultimately be used for badmouthing co-workers, interrupting people when they speak, and never bothering to say thank you."
0/0
 Reply   Quote More 

 From:  Matt  
 To:  CHYRON (DSMITHHFX)     
40661.12 In reply to 40661.5 
If you were genuinely only doing that, and IE stopped responding to clicks, then sure IE is broken.

But I suspect you have other (broken) JavaScript on the page (console is your friend), or maybe have managed to position a transparent element over the click target (element selector is your friend) which is stopping the target element from receiving the click events.

The whole point of jQuery is that it makes things like this behave the same across all browsers, including IE.

doohicky

0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  Matt     
40661.13 In reply to 40661.12 
http://www.tehforum.co.uk/forum/index.php?webtag=DEFAULT&msg=40661.11

----
"But as the baby's mouth develops into adulthood, it will ultimately be used for badmouthing co-workers, interrupting people when they speak, and never bothering to say thank you."
0/0
 Reply   Quote More 

 From:  af (CAER)  
 To:  CHYRON (DSMITHHFX)     
40661.14 In reply to 40661.13 
The point is, it's more likely the broken code you're using/writing being the issue, than it is jQuery's compatibility with IE10 being the issue.

Yes, old IEs can be a pain to work with, but the problem here could be several things specific to IE10, possibly it being more strict about certain things than Firefox or Chrome, or like Matt said, transparent elements over the target, or some slight difference in how IE interprets some CSS.

The point is you don't know, which is why everyone is telling you to open IE's console/dev tools and find out what the actual cause of the problem is, and fix that, rather than resorting to horrible inline-JS hackery.
0/0
 Reply   Quote More 

 From:  af (CAER)  
 To:  CHYRON (DSMITHHFX)     
40661.15 In reply to 40661.13 
And if you have found an issue with jQuery and its different handling of browser features, you should let the jQuery devs know about it.
0/0
 Reply   Quote More 

 From:  af (CAER)  
 To:  CHYRON (DSMITHHFX)     
40661.16 In reply to 40661.5 
Here's a minimal test case:
http://caer.me/clickhandler.html
0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  af (CAER)     
40661.17 In reply to 40661.14 
I suspect an IE-specific conflict between the ca. 2008 css list js and jquery that I injected my little submenu into.

I got it working. Am I going to now obsessive-compulsively troubleshoot an issue between a really old (and rather complex) javascript, jquery and IE10?

In a word, no.

----
"But as the baby's mouth develops into adulthood, it will ultimately be used for badmouthing co-workers, interrupting people when they speak, and never bothering to say thank you."
0/0
 Reply   Quote More 

 From:  af (CAER)  
 To:  CHYRON (DSMITHHFX)     
40661.18 In reply to 40661.17 
Well sure, if it's an isolated case then no point losing sleep over it. Like you said earlier, the user isn't going to be looking at the source anyway, so if it works, no big deal.
0/0
 Reply   Quote More 

 From:  CHYRON (DSMITHHFX)  
 To:  af (CAER)     
40661.19 In reply to 40661.18 
You are not PB.

----
"But as the baby's mouth develops into adulthood, it will ultimately be used for badmouthing co-workers, interrupting people when they speak, and never bothering to say thank you."
0/0
 Reply   Quote More 

 From:  Peter (BOUGHTONP)  
 To:  CHYRON (DSMITHHFX)     
40661.20 In reply to 40661.17 
It's quite simple:

    •  If all you want to do is whine about how useless you are at debugging trivial JS issues, use Ranter's Corner.

    •  If you want to receive advice on how you can stop being useless, post in Coding. It's not like these folder things are new technology or anything...

0/0
 Reply   Quote More 

Reply to All  
 

1–20  21–40  41–58

Rate my interest:

Adjust text size : Smaller 10 Larger

Beehive Forum 1.5.2 |  FAQ |  Docs |  Support |  Donate! ©2002 - 2024 Project Beehive Forum

Forum Stats