|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
Correcting Style in IE 6 & 7 Without CSS ExpressionsIn addition to the original goal of this project, I've found a side- effect: Behaviour offers similar functionality as IE-only CSS expressions. (CSS expressions are to be avoided because they slow the page's operation in IE.) But I'm having trouble applying the library to this task; nothing is being corrected. See http://forums.mozillazine.org/viewtopic.php?p=3204629#3204629 for the full source. Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Behaviour Javascript Library" group. To post to this group, send email to behaviour@... To unsubscribe from this group, send email to behaviour-unsubscribe@... For more options, visit this group at http://groups.google.com/group/behaviour?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Correcting Style in IE 6 & 7 Without CSS ExpressionsChris, The error of your ways is that you are calling Behaviour.register from a function, that has been called onload. Since Behaviour.register does nothing but set up an onload action, that won't work (since onload has already fired). The correct way to accomplish your goal is either: 1) to run correctStyle before onload happens, if possible (could be in a script block immediately before the end-body tag), or 2) to call Behaviour.applySheet (from my updated version of Behaviour) from correctStyle, instead of Behaviour.register. By 1 you will register the onload handler before onload fires. By 2 you will apply the sheets without using the onload handler from Behaviour (so using just your own onload handler). The effects will be similar. Regards, Jakob On Jan 3, 8:57 pm, Chris <jesdisci...@...> wrote: > In addition to the original goal of this project, I've found a side- > effect: Behaviour offers similar functionality as IE-only CSS > expressions. (CSS expressions are to be avoided because they slow the > page's operation in IE.) But I'm having trouble applying the library > to this task; nothing is being corrected. Seehttp://forums.mozillazine.org/viewtopic.php?p=3204629#3204629for the > full source. > > Thanks! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Behaviour Javascript Library" group. To post to this group, send email to behaviour@... To unsubscribe from this group, send email to behaviour-unsubscribe@... For more options, visit this group at http://groups.google.com/group/behaviour?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Correcting Style in IE 6 & 7 Without CSS ExpressionsSorry I took so long to reply... I have the page hosted at http://www.auto-chat.net/ccarter/expression-replacement/index.html and the second change you prescribed hasn't had any effect. (I chose #2 because I need 'document' ready before 'correctStyle' is run.) On Jan 7, 1:40 am, Jakob Kruse <kr...@...> wrote: > Chris, > > The error of your ways is that you are calling Behaviour.register from > a function, that has been called onload. Since Behaviour.register does > nothing but set up an onload action, that won't work (since onload has > already fired). > > The correct way to accomplish your goal is either: > > 1) to run correctStyle before onload happens, if possible (could be in > a script block immediately before the end-body tag), or > > 2) to call Behaviour.applySheet (from my updated version of Behaviour) > from correctStyle, instead of Behaviour.register. > > By 1 you will register the onload handler before onload fires. By 2 > you will apply the sheets without using the onload handler from > Behaviour (so using just your own onload handler). The effects will be > similar. > > Regards, > Jakob > > On Jan 3, 8:57 pm, Chris <jesdisci...@...> wrote: > > > In addition to the original goal of this project, I've found a side- > > effect: Behaviour offers similar functionality as IE-only CSS > > expressions. (CSS expressions are to be avoided because they slow the > > page's operation in IE.) But I'm having trouble applying the library > > to this task; nothing is being corrected. Seehttp://forums.mozillazine.org/viewtopic.php?p=3204629#3204629forthe > > full source. > > > Thanks! You received this message because you are subscribed to the Google Groups "Behaviour Javascript Library" group. To post to this group, send email to behaviour@... To unsubscribe from this group, send email to behaviour-unsubscribe@... For more options, visit this group at http://groups.google.com/group/behaviour?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Correcting Style in IE 6 & 7 Without CSS ExpressionsChris, The paths you specify to ie7-hacks.css, Protootype.js and Behaviour.js are invalid, so these aren't loaded at all. Regards, Jakob On Jan 12, 4:22 am, Chris <jesdisci...@...> wrote: > Sorry I took so long to reply... I have the page hosted athttp://www.auto-chat.net/ccarter/expression-replacement/index.htmland > the second change you prescribed hasn't had any effect. (I chose #2 > because I need 'document' ready before 'correctStyle' is run.) > > On Jan 7, 1:40 am,JakobKruse<kr...@...> wrote: > > > Chris, > > > The error of your ways is that you are calling Behaviour.register from > > a function, that has been called onload. Since Behaviour.register does > > nothing but set up an onload action, that won't work (since onload has > > already fired). > > > The correct way to accomplish your goal is either: > > > 1) to run correctStyle before onload happens, if possible (could be in > > a script block immediately before the end-body tag), or > > > 2) to call Behaviour.applySheet (from my updated version of Behaviour) > > from correctStyle, instead of Behaviour.register. > > > By 1 you will register the onload handler before onload fires. By 2 > > you will apply the sheets without using the onload handler from > > Behaviour (so using just your own onload handler). The effects will be > > similar. > > > Regards, > >Jakob > > > On Jan 3, 8:57 pm, Chris <jesdisci...@...> wrote: > > > > In addition to the original goal of this project, I've found a side- > > > effect: Behaviour offers similar functionality as IE-only CSS > > > expressions. (CSS expressions are to be avoided because they slow the > > > page's operation in IE.) But I'm having trouble applying the library > > > to this task; nothing is being corrected. Seehttp://forums.mozillazine.org/viewtopic.php?p=3204629#3204629forthe > > > full source. > > > > Thanks! You received this message because you are subscribed to the Google Groups "Behaviour Javascript Library" group. To post to this group, send email to behaviour@... To unsubscribe from this group, send email to behaviour-unsubscribe@... For more options, visit this group at http://groups.google.com/group/behaviour?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Correcting Style in IE 6 & 7 Without CSS ExpressionsOops! I always forget to correct my links when I upload files built on my computer. Now I get this from Firebug: missing } after function body http://www.auto-chat.net/ccarter/expression-replacement/Prototype.js Line 2003 And it shows "retur" (no 'n') as the faulty code. Do I need to ask prototypejs.org about this? On Jan 13, 7:02 am, Jakob Kruse <kr...@...> wrote: > Chris, > > The paths you specify to ie7-hacks.css, Protootype.js and Behaviour.js > are invalid, so these aren't loaded at all. > > Regards, > Jakob > > On Jan 12, 4:22 am, Chris <jesdisci...@...> wrote: > > > Sorry I took so long to reply... I have the page hosted athttp://www.auto-chat.net/ccarter/expression-replacement/index.htmland > > the second change you prescribed hasn't had any effect. (I chose #2 > > because I need 'document' ready before 'correctStyle' is run.) > > > On Jan 7, 1:40 am,JakobKruse<kr...@...> wrote: > > > > Chris, > > > > The error of your ways is that you are calling Behaviour.register from > > > a function, that has been called onload. Since Behaviour.register does > > > nothing but set up an onload action, that won't work (since onload has > > > already fired). > > > > The correct way to accomplish your goal is either: > > > > 1) to run correctStyle before onload happens, if possible (could be in > > > a script block immediately before the end-body tag), or > > > > 2) to call Behaviour.applySheet (from my updated version of Behaviour) > > > from correctStyle, instead of Behaviour.register. > > > > By 1 you will register the onload handler before onload fires. By 2 > > > you will apply the sheets without using the onload handler from > > > Behaviour (so using just your own onload handler). The effects will be > > > similar. > > > > Regards, > > >Jakob > > > > On Jan 3, 8:57 pm, Chris <jesdisci...@...> wrote: > > > > > In addition to the original goal of this project, I've found a side- > > > > effect: Behaviour offers similar functionality as IE-only CSS > > > > expressions. (CSS expressions are to be avoided because they slow the > > > > page's operation in IE.) But I'm having trouble applying the library > > > > to this task; nothing is being corrected. Seehttp://forums.mozillazine.org/viewtopic.php?p=3204629#3204629forthe > > > > full source. > > > > > Thanks! You received this message because you are subscribed to the Google Groups "Behaviour Javascript Library" group. To post to this group, send email to behaviour@... To unsubscribe from this group, send email to behaviour-unsubscribe@... For more options, visit this group at http://groups.google.com/group/behaviour?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Correcting Style in IE 6 & 7 Without CSS ExpressionsMore relevantly, IE7 gives [Expected ';'] for Line 3141, Char 8 - in Prototype.js, I assume, because it's the only one with that many lines. That line is: byClassName: function(nodes, root, className) { if (!nodes) nodes = Selector.handlers.descendant([root]); var needle = ' ' + className + ' '; for (var i = 0, results = [], node, nodeClassName; node = nodes[i]; i++) { nodeClassName = node.className;// <<<--------------------------------- RIGHT HERE --------<<< if (nodeClassName.length == 0) continue; if (nodeClassName == className || (' ' + nodeClassName + ' ').include(needle)) results.push(node); } return results; }, On Jan 13, 11:41 am, Chris <jesdisci...@...> wrote: > Oops! I always forget to correct my links when I upload files built > on my computer. > > Now I get this from Firebug: > > missing } after function bodyhttp://www.auto-chat.net/ccarter/expression-replacement/Prototype.js > Line 2003 > > And it shows "retur" (no 'n') as the faulty code. Do I need to ask > prototypejs.org about this? > > On Jan 13, 7:02 am, Jakob Kruse <kr...@...> wrote: > > > Chris, > > > The paths you specify to ie7-hacks.css, Protootype.js and Behaviour.js > > are invalid, so these aren't loaded at all. > > > Regards, > > Jakob > > > On Jan 12, 4:22 am, Chris <jesdisci...@...> wrote: > > > > Sorry I took so long to reply... I have the page hosted athttp://www.auto-chat.net/ccarter/expression-replacement/index.htmland > > > the second change you prescribed hasn't had any effect. (I chose #2 > > > because I need 'document' ready before 'correctStyle' is run.) > > > > On Jan 7, 1:40 am,JakobKruse<kr...@...> wrote: > > > > > Chris, > > > > > The error of your ways is that you are calling Behaviour.register from > > > > a function, that has been called onload. Since Behaviour.register does > > > > nothing but set up an onload action, that won't work (since onload has > > > > already fired). > > > > > The correct way to accomplish your goal is either: > > > > > 1) to run correctStyle before onload happens, if possible (could be in > > > > a script block immediately before the end-body tag), or > > > > > 2) to call Behaviour.applySheet (from my updated version of Behaviour) > > > > from correctStyle, instead of Behaviour.register. > > > > > By 1 you will register the onload handler before onload fires. By 2 > > > > you will apply the sheets without using the onload handler from > > > > Behaviour (so using just your own onload handler). The effects will be > > > > similar. > > > > > Regards, > > > >Jakob > > > > > On Jan 3, 8:57 pm, Chris <jesdisci...@...> wrote: > > > > > > In addition to the original goal of this project, I've found a side- > > > > > effect: Behaviour offers similar functionality as IE-only CSS > > > > > expressions. (CSS expressions are to be avoided because they slow the > > > > > page's operation in IE.) But I'm having trouble applying the library > > > > > to this task; nothing is being corrected. Seehttp://forums.mozillazine.org/viewtopic.php?p=3204629#3204629forthe > > > > > full source. > > > > > > Thanks! You received this message because you are subscribed to the Google Groups "Behaviour Javascript Library" group. To post to this group, send email to behaviour@... To unsubscribe from this group, send email to behaviour-unsubscribe@... For more options, visit this group at http://groups.google.com/group/behaviour?hl=en -~----------~----~----~----~------~----~------~--~--- |
|
|
Re: Correcting Style in IE 6 & 7 Without CSS ExpressionsI can guarantee that Prototype.js does not give load errors in IE7. Your problem must be something else. The only error I get when I load your site in Firefox is a complaint about .currentStyle (which is an IE-only thing) not being defined. I always recommend getting everything to work in Firefox first, because debugging there is easier. And I use Prototype and Behaviour in many places, in both Firefox and IE6 and IE7, so the problem probably lies somewhere in your code. Regards, Jakob On Jan 13, 6:59 pm, Chris <jesdisci...@...> wrote: > More relevantly, IE7 gives [Expected ';'] for Line 3141, Char 8 - in > Prototype.js, I assume, because it's the only one with that many > lines. That line is: > > byClassName: function(nodes, root, className) { > if (!nodes) nodes = Selector.handlers.descendant([root]); > var needle = ' ' + className + ' '; > for (var i = 0, results = [], node, nodeClassName; node = > nodes[i]; i++) { > nodeClassName = node.className;// > <<<--------------------------------- RIGHT HERE --------<<< > if (nodeClassName.length == 0) continue; > if (nodeClassName == className || (' ' + nodeClassName + ' > ').include(needle)) > results.push(node); > } > return results; > }, > > On Jan 13, 11:41 am, Chris <jesdisci...@...> wrote: > > > Oops! I always forget to correct my links when I upload files built > > on my computer. > > > Now I get this from Firebug: > > > missing } after function bodyhttp://www.auto-chat.net/ccarter/expression-replacement/Prototype.js > > Line 2003 > > > And it shows "retur" (no 'n') as the faulty code. Do I need to ask > > prototypejs.org about this? > > > On Jan 13, 7:02 am,JakobKruse<kr...@...> wrote: > > > > Chris, > > > > The paths you specify to ie7-hacks.css, Protootype.js and Behaviour.js > > > are invalid, so these aren't loaded at all. > > > > Regards, > > >Jakob > > > > On Jan 12, 4:22 am, Chris <jesdisci...@...> wrote: > > > > > Sorry I took so long to reply... I have the page hosted athttp://www.auto-chat.net/ccarter/expression-replacement/index.htmland > > > > the second change you prescribed hasn't had any effect. (I chose #2 > > > > because I need 'document' ready before 'correctStyle' is run.) > > > > > On Jan 7, 1:40 am,JakobKruse<kr...@...> wrote: > > > > > > Chris, > > > > > > The error of your ways is that you are calling Behaviour.register from > > > > > a function, that has been called onload. Since Behaviour.register does > > > > > nothing but set up an onload action, that won't work (since onload has > > > > > already fired). > > > > > > The correct way to accomplish your goal is either: > > > > > > 1) to run correctStyle before onload happens, if possible (could be in > > > > > a script block immediately before the end-body tag), or > > > > > > 2) to call Behaviour.applySheet (from my updated version of Behaviour) > > > > > from correctStyle, instead of Behaviour.register. > > > > > > By 1 you will register the onload handler before onload fires. By 2 > > > > > you will apply the sheets without using the onload handler from > > > > > Behaviour (so using just your own onload handler). The effects will be > > > > > similar. > > > > > > Regards, > > > > >Jakob > > > > > > On Jan 3, 8:57 pm, Chris <jesdisci...@...> wrote: > > > > > > > In addition to the original goal of this project, I've found a side- > > > > > > effect: Behaviour offers similar functionality as IE-only CSS > > > > > > expressions. (CSS expressions are to be avoided because they slow the > > > > > > page's operation in IE.) But I'm having trouble applying the library > > > > > > to this task; nothing is being corrected. Seehttp://forums.mozillazine.org/viewtopic.php?p=3204629#3204629forthe > > > > > > full source. > > > > > > > Thanks! You received this message because you are subscribed to the Google Groups "Behaviour Javascript Library" group. To post to this group, send email to behaviour@... To unsubscribe from this group, send email to behaviour-unsubscribe@... For more options, visit this group at http://groups.google.com/group/behaviour?hl=en -~----------~----~----~----~------~----~------~--~--- |
| Free embeddable forum powered by Nabble | Forum Help |