DHTML Woes...

Want to chit chat about anything, do it here ... posting here won't increase your post count (or shouldn't!). Please do not post any "phpBB" specific topics here unless they do not fit into the category above. Do not post bug reports, feature or support requests!
Forum rules
Please do not post any "phpBB" specific topics here unless they do not fit into the category above.

Do not post bug reports, feature or support requests! No really... Do not post bug reports, feature or support requests! Doing so will make Bertie a very sad bear indeed. :(
Post Reply
FF8Jake
Registered User
Posts: 31
Joined: Wed Jun 11, 2003 2:43 pm
Location: An arrangement of pixels on your screen.
Contact:

DHTML Woes...

Post by FF8Jake »

Okay, I really didn't want to post this up for viewing until I had a release available, but i've hit a rock in my developement of a new phpbb template: IE.

First off, sorry if this is in the wrong spot. I didn't think it would be appropriate to clutter the 3.0 Styles forum with a 2.0.* template topic, and phpbb.com is down so i'm at a loss.

My upcoming template for 2.0.*, Schlick, has an expanding menu near the top of the forum. This menu works flawlessly for me in Firefox, but I get absolutely no response from IE6. Normally I hardly use any javascript, if at all, so my javascripting is extremely rusty. You can see it near the top of the source code, along with my comments about what the code does.

I'd really appreciate it if anyone had an idea as to why IE doesn't like this(and a solution would really, really be <3).

Cheers

Erisar
Registered User
Posts: 84
Joined: Sat Mar 01, 2003 6:58 am
Location: Here.
Contact:

Re: DHTML Woes...

Post by Erisar »

Nice template design. :)

Not to add to your woes, but there are some issues in Safari as well which may or not be linked to the IE issues; I'm not sure. In Safari the menu appears, but the "Expand/Contract Menu" is backwards; when the menu layer is visible the button reads "Expand Menu," and when hidden it reads "Contract Menu."

A quick look at your code makes me think this mismatching could be caused by having your imageToggle and menuToggle as seperate functions; if possible, maybe consolidating them into one would fix the problem. Then again I hardly ever use Javascript, so what do I know. :P :mrgreen:


PS: Ocarina of Time > *
Erisar · Styles Team Leader
Erisar Studios · Follow me on Twitter · My phpBB.com Profile

phpBB: Rules · Knowledge Base · Documentation | Styles: Submit · FAQ · Template Changes
Do not message me for support. Due to the high volume of messages I receive, I will not reply.

FF8Jake
Registered User
Posts: 31
Joined: Wed Jun 11, 2003 2:43 pm
Location: An arrangement of pixels on your screen.
Contact:

Re: DHTML Woes...

Post by FF8Jake »

Erisar wrote: Nice template design. :)
Thanks!
Not to add to your woes, but there are some issues in Safari as well which may or not be linked to the IE issues; I'm not sure. In Safari the menu appears, but the "Expand/Contract Menu" is backwards; when the menu layer is visible the button reads "Expand Menu," and when hidden it reads "Contract Menu."

A quick look at your code makes me think this mismatching could be caused by having your imageToggle and menuToggle as seperate functions; if possible, maybe consolidating them into one would fix the problem. Then again I hardly ever use Javascript, so what do I know. :P :mrgreen:
Doh, they are nearly exactly the same. I'll do it anyway just to trim code down.

EDIT: Function updated. It didn't fix the problem in IE, but it did make the function much more flexible(since I can now specify what attribute needs to be changed in each array, rather than the functions! Many thanks Erisar!).

Magnotta
Registered User
Posts: 80
Joined: Wed Feb 09, 2005 12:49 am

Re: DHTML Woes...

Post by Magnotta »

That is a good reason to try and stay away from Javascript when designing a style. The fact is that it's not even really IE's fault this time. Different browsers handle javascript differently, and there is no standard which IE is breaking this time, it's basically every browser follows what they want really(ok, that's done in html as well, but the difference is that then they are breaking a set standard). Until a standard for Javascript has been made, stay away from using it as much as possible if yoru trying to make something for a lot of people to use.

Other reasons to avoid it are that users may have it disabled. It's like Flash in that sense, some users prefer to not have it in their browser, no matter which browser they may have.

FF8Jake
Registered User
Posts: 31
Joined: Wed Jun 11, 2003 2:43 pm
Location: An arrangement of pixels on your screen.
Contact:

Re: DHTML Woes...

Post by FF8Jake »

That is a good reason to try and stay away from Javascript when designing a style. The fact is that it's not even really IE's fault this time. Different browsers handle javascript differently, and there is no standard which IE is breaking this time, it's basically every browser follows what they want really(ok, that's done in html as well, but the difference is that then they are breaking a set standard). Until a standard for Javascript has been made, stay away from using it as much as possible if yoru trying to make something for a lot of people to use.
Firstly, I never said it was due to IE not being up to standards, though I can see where that could be assumed, since IE has thrown a lot of standards out the window, but it could be IE/Safari not supporting standards DOMwise/CSSwise. I recently had problems in Safari with this template, until Safari was updated and the problem magically fixed itself.

As far as not using it due to some people having it disabled, i'm not too worried about that. It's used far too much for most to go without(oh no, here comes the onslaught of posts from people who do have it disabled...), and I really can't see the need for a template to lose some nice stuff just to cater to so few. Even software like phpbb uses it to a decent extent.

But I do agree that browsers interpret js differently, thus why i've posted up here to perhaps find a solution(as there are plenty of different ways to do what I want, i'm sure. Expanding menus aren't anything new to the webdesign world.) ;) and :)

Magnotta
Registered User
Posts: 80
Joined: Wed Feb 09, 2005 12:49 am

Re: DHTML Woes...

Post by Magnotta »

FF8Jake wrote: Firstly, I never said it was due to IE not being up to standards, though I can see where that could be assumed, since IE has thrown a lot of standards out the window, but it could be IE/Safari not supporting standards DOMwise/CSSwise. I recently had problems in Safari with this template, until Safari was updated and the problem magically fixed itself.
I know you never said the problem is not due to IE not following standards, I just figured I'd mention it before someone else replies saying its "due to IE not following standards again".

User avatar
Fubonis
Registered User
Posts: 56
Joined: Sun Dec 02, 2001 6:05 am
Contact:

Re: DHTML Woes...

Post by Fubonis »

I think it has to do with this class member:

Code: Select all

document.getElementById(string);
If I remember correctly, Microsoft Internet Explorer does not support getElementById. I think MSIE uses document.all(string).

Looks good on Mozilla on Linux. omgwtflolbbq.
lol text cos it wuz all liek, "wtf 2 small"

FF8Jake
Registered User
Posts: 31
Joined: Wed Jun 11, 2003 2:43 pm
Location: An arrangement of pixels on your screen.
Contact:

Re: DHTML Woes...

Post by FF8Jake »

Fubonis wrote: I think it has to do with this class member:

Code: Select all

document.getElementById(string);
If I remember correctly, Microsoft Internet Explorer does not support getElementById. I think MSIE uses document.all(string).
*creams*

A little browser detection may do the trick then. ^_____________^
Looks good on Mozilla on Linux. omgwtflolbbq.
<3

You really should stop by IRC sometime, you know... :)

User avatar
Fubonis
Registered User
Posts: 56
Joined: Sun Dec 02, 2001 6:05 am
Contact:

Re: DHTML Woes...

Post by Fubonis »

Gosh, what's the channel name on Draegonis' server? I tried tech and teh but ChanServ was all like "THESE CHICKS DON'T EVEN KNOW THE NAME OF MY +B."
lol text cos it wuz all liek, "wtf 2 small"

Anon
Registered User
Posts: 120
Joined: Fri Jan 30, 2004 7:55 am

Re: DHTML Woes...

Post by Anon »

Count yourself lucky. Draegonis's ChanServ hurled abuse at me 8O

anyway, try

irc.freenode.net #phpbb

Code: Select all

:D|-<
:D/-<
:D\-<

Post Reply